Skip to content

Commit

Permalink
forenkling av test
Browse files Browse the repository at this point in the history
  • Loading branch information
arnfinn committed Nov 22, 2024
1 parent b45d059 commit 8ad2c84
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions tests/testthat/test-log.R
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,21 @@ test_that("loggerSetup is working", {
# Test what has been logged
expect_true(jsonlite::validate(infoLogjson))
infoLog <- jsonlite::fromJSON(infoLogjson)
expect_equal(nchar(infoLog$time), 23)
expect_equal(infoLog$level, "INFO")
expect_equal(infoLog$message, "Test log setup")
expect_equal(infoLog$app, "rapbasis")
expect_equal(infoLog$user, "jesus@sky.com")
expect_equal(
c(
nchar(infoLog$time),
infoLog$level,
infoLog$message,
infoLog$app,
infoLog$user),
c(
23,
"INFO",
"Test log setup",
"rapbasis",
"jesus@sky.com"
)
)

# env-stuff
if (currentUser == "" && currentApp == "") {
Expand Down

0 comments on commit 8ad2c84

Please sign in to comment.