Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes #2579 Add test #11 test-derive_vars_query.R Calls assert_db_require… #2634

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions tests/testthat/_snaps/create_query_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,19 @@
Error in `basket_select()`:
! argument "type" is missing, with no default

# assert_db_requirements 24: assert_db_requirements() throws error and increases code coverage when called with no `fun` arugment provided

Code
assert_db_requirements(fun = NULL)
Condition
Error in `assert_db_requirements()`:
! argument "queries" is missing, with no default

# assert_db_requirements 25: assert_db_requirements() throws error and increases code coverage when called with no `queries` arugment provided

Code
assert_db_requirements(fun = print, version = NULL)
Condition
Error in `assert_db_requirements()`:
! argument "queries" is missing, with no default

18 changes: 18 additions & 0 deletions tests/testthat/test-create_query_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -578,3 +578,21 @@ test_that("format.basket_select Test 23: formatting is correct (name specified)"
"basket_select(name = \"My SDG\", id = NULL, scope = \"NA\", type = \"sdg\")"
)
})

# assert_db_requirements ----
## Test 24: assert_db_requirements_
test_that("assert_db_requirements 24: assert_db_requirements() throws error and
increases code coverage when called with no `fun` arugment provided", {
expect_snapshot(
assert_db_requirements(fun = NULL),
error = TRUE
)
})
## Test 25: assert_db_requirements_
test_that("assert_db_requirements 25: assert_db_requirements() throws error and
increases code coverage when called with no `queries` arugment provided", {
expect_snapshot(
assert_db_requirements(fun = print, version = NULL),
error = TRUE
)
})
Loading