Skip to content

Commit

Permalink
add tests for combine_docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ernestguevarra committed Jun 16, 2020
1 parent 63c1e58 commit 74a05e6
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions tests/testthat/test-10-combine.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
x <- combine_docs(docs = "resolution")


test_that("x is a tibble", {
expect_is(x, "tbl")
})

test_that("x has 6 columns", {
expect_equal(ncol(x), 6)
})

test_that("id is numeric", {
expect_is(x$id, "numeric")
})

test_that("date is a date", {
expect_is(x$date, "Date")
})

test_that("source is iatf", {
expect_true(all(x$source == "IATF"))
})

x <- combine_iatf()

test_that("x is a tibble", {
expect_is(x, "tbl")
})

test_that("x has 6 columns", {
expect_equal(ncol(x), 6)
})

test_that("id is numeric", {
expect_is(x$id, "numeric")
})

test_that("date is a date", {
expect_is(x$date, "Date")
})

test_that("source is iatf", {
expect_true(all(x$source == "IATF"))
})

0 comments on commit 74a05e6

Please sign in to comment.