tests/testthat/test_api_access.R

test_that("welcome returns correct name", {

  # Skip if no internet connection, or the bnm site is down.
  testthat::skip_if_offline("api.bnm.gov.my")
  testthat::skip_on_cran()

  expect_equal(bnm_api("/welcome")$content$name,
               "BNM.API")
})
philip-khor/bnmr documentation built on Nov. 23, 2023, 6:59 a.m.