Skip to content

Commit

Permalink
re-instate test db connection test
Browse files Browse the repository at this point in the history
  • Loading branch information
eroten committed Dec 19, 2024
1 parent 57f3e01 commit b0cbdb0
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions tests/testthat/test-db_FRED.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@ testthat::test_that("upercase group quarters table", {
testthat::expect_equal(class(gq)[[1]], "data.frame")
})

# testthat::test_that("test group quarters table", {
# gq <- import_from_FRED(
# table_name = "GQ_UNIT",
# prod = FALSE,
# uid = httr2::secret_decrypt("QUHBRb_yoy2RRj59qno8NVXA7mW402xkins", "COUNCILR_KEY"),
# pwd = httr2::secret_decrypt("tsGlVlM0KBdLcUPNLX5f0Hll2_6HFF_rQx62cw", "COUNCILR_KEY"),
# db = "CD_RESEARCH_WEB"
# )
#
# # test that data is returned from gq unit table, currently 11837 rows
# testthat::expect_gte(nrow(gq), 11837)
#
# # test that object returned is a data.frame
# testthat::expect_equal(class(gq)[[1]], "data.frame")
# })
testthat::test_that("test group quarters table", {
gq <- import_from_FRED(
table_name = "GQ_UNIT",
prod = FALSE,
uid = httr2::secret_decrypt("QUHBRb_yoy2RRj59qno8NVXA7mW402xkins", "COUNCILR_KEY"),
pwd = httr2::secret_decrypt("tsGlVlM0KBdLcUPNLX5f0Hll2_6HFF_rQx62cw", "COUNCILR_KEY"),
db = "CD_RESEARCH_WEB"
)

# test that data is returned from gq unit table, currently 11837 rows
testthat::expect_gte(nrow(gq), 11837)

# test that object returned is a data.frame
testthat::expect_equal(class(gq)[[1]], "data.frame")
})



Expand Down

0 comments on commit b0cbdb0

Please sign in to comment.