Skip to content

Commit

Permalink
removed constantly failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewallenbruce committed Dec 4, 2024
1 parent bebf7f3 commit 2d28c8b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 19 deletions.
14 changes: 0 additions & 14 deletions tests/testthat/_snaps/utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,6 @@
! `type` must be one of "filter" or "sql", not "filthy".
i Did you mean "filter"?

# file_url() works

Code
file_url(fn = "c", args = args, offset = 0L)
Output
[1] "https://data.cms.gov/provider-data/api/1/datastore/sql?query=%5BSELECT%20%2A%20FROM%20fa844ce1-fef1-5082-9fef-ae017c385b84%5D%5BWHERE%20NPI%20=%20%221144544834%22%5D%5BLIMIT%2010000%20OFFSET%200%5D;&show_db_columns"

---

Code
file_url(fn = "a", args = args, offset = 0L)
Output
[1] "https://data.cms.gov/provider-data/api/1/datastore/sql?query=%5BSELECT%20%2A%20FROM%20e7eabe0d-75c1-58e6-8fba-bae965a2c6d2%5D%5BWHERE%20NPI%20=%20%221144544834%22%5D%5BLIMIT%2010000%20OFFSET%200%5D;&show_db_columns"

# format_cli() works

Code
Expand Down
16 changes: 11 additions & 5 deletions tests/testthat/test-utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,17 @@ test_that("encode_url() works", {
expect_equal(encode_url("[ * ]"), "%5B%20%2A%20%5D")
})

test_that("file_url() works", {
args <- dplyr::tibble(param = "NPI", arg = "1144544834")
expect_snapshot(file_url(fn = "c", args = args, offset = 0L), error = FALSE)
expect_snapshot(file_url(fn = "a", args = args, offset = 0L), error = FALSE)
})
# ALWAYS FAIL
# test_that("file_url() works", {
#
# args <- dplyr::tibble(param = "NPI", arg = "1144544834")
#
# expect_snapshot(file_url(fn = "c", args = args, offset = 0L), error = FALSE)
# expect_snapshot(file_url(fn = "a", args = args, offset = 0L), error = FALSE)
# })
#
# HASH IN URL IS CHANGING FREQUENTLY
# https://data.cms.gov/provider-data/api/1/datastore/sql?query=%5BSELECT%20%2A%20FROM%201e88f761-7d99-55ca-a8fc-20b193b0d2ea%5D%5BWHERE%20NPI%20=%20%221144544834%22%5D%5BLIMIT%2010000%20OFFSET%200%5D;&show_db_columns

test_that("format_cli() works", {
args <- dplyr::tibble(x = "NPI", y = "1144544834")
Expand Down

0 comments on commit 2d28c8b

Please sign in to comment.