tests/testthat/test-hq-rainfall.R

context('hq-rainfall')

futile.logger::flog.threshold(futile.logger::ERROR, name = 'bomdata')

## add_high_quality_rainfall

test_that(
  'add_high_quality_rainfall loads data',
  with_db(function(db_connection) {
    # NOTE(mgnb): this test is slow and that's annoying
    add_high_quality_rainfall(db_connection)

    site_count <- DBI::dbGetQuery(db_connection, '
      SELECT COUNT(*) FROM bom_site
    ')
    expect_true(site_count[1, 1] > 100)
  })
)
mbertolacci/bomdata documentation built on May 22, 2019, 12:19 p.m.