-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #156 from thekangaroofactory/beta
Milestone partial delivery: Beta
- Loading branch information
Showing
3 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
|
||
|
||
test_that("dm_check_integrity", { | ||
|
||
# -- function call | ||
output <- dm_check_integrity(data.model = dm, items = items, template = NULL) | ||
|
||
# -- check | ||
expect_true(output) | ||
|
||
}) | ||
|
||
|
||
test_that("dm_check_integrity: extra attribute in items", { | ||
|
||
# -- function call | ||
output <- dm_check_integrity(data.model = dm, items = items_extra_att, template = NULL) | ||
|
||
# -- checks: | ||
expect_output(str(output), "data.frame") | ||
|
||
# -- check: output dim | ||
expect_equal(dim(output), c(5,6)) | ||
|
||
}) | ||
|
||
|
||
test_that("dm_check_integrity: extra attribute in data model", { | ||
|
||
# -- function call | ||
output <- dm_check_integrity(data.model = dm_extra_att, items = items, template = NULL) | ||
|
||
# -- checks: | ||
expect_output(str(output), "data.frame") | ||
|
||
# -- check: output dim | ||
expect_equal(dim(output), c(4,6)) | ||
|
||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
test_that("dm_colClasses", { | ||
|
||
# -- function call | ||
x <- dm_colClasses(data.model = dm) | ||
|
||
# -- test | ||
expect_mapequal(x, c(id = "numeric", date = "POSIXct", name = "character", isvalid = "logical")) | ||
|
||
}) |