Skip to content

Commit

Permalink
Fix strict schema validation test
Browse files Browse the repository at this point in the history
  • Loading branch information
jrdnbradford committed Dec 18, 2024
1 parent e3c5576 commit 0623eb8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/testthat/test-lockfile-validate.R
Original file line number Diff line number Diff line change
Expand Up @@ -310,15 +310,15 @@ test_that("strict mode catches unknown keyword in provided schema", {
}
]
},
"Packages": [
"Packages": {
"markdown": {
"Package": "markdown",
"Version": "1.0",
"Source": "Repository",
"Repository": "CRAN",
"Hash": "4584a57f565dd7987d59dda3a02cfb41"
}
]
}
}
'

Expand All @@ -331,14 +331,14 @@ test_that("strict mode catches unknown keyword in provided schema", {
"type": "object",
"properties": {
"Version": {
"type": "UNKNOWN"
"UNKNOWN": "string"
}
}
}
}
}
'

expect_error(lockfile_validate(lockfile = lockfile, strict = TRUE))
expect_true(lockfile_validate(lockfile = lockfile, schema = schema))
expect_error(lockfile_validate(lockfile = lockfile, schema = schema, strict = TRUE))

})

0 comments on commit 0623eb8

Please sign in to comment.