Skip to content

Commit

Permalink
travis fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jackhannah95 committed Apr 9, 2020
1 parent 2af98b5 commit 243d0d9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 40 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Authors@R: c(
person("Tina", "Fu", email = "[email protected]", role = "aut"),
person("Ciara", "Gribben", email = "[email protected]", role = "aut"),
person("Chris", "Deans", email = "[email protected]", role = "aut"),
person("Jaime", "Villacampa", email = "[email protected]", role = "aut")
person("Jaime", "Villacampa", email = "[email protected]", role = "aut"),
person("Graeme", "Gowans", email = "[email protected]", role = "aut")
)
Description: Bespoke functions for commonly undertaken analytical tasks in Public Health Scotland.
Expand Down
39 changes: 0 additions & 39 deletions tests/testthat/test-match_area.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,49 +29,10 @@ test_that("Returns the correct area names", {
"Banff"))
})

test_that("Returns the correct geography codes", {
expect_equal(match_area(c("Eaglesham",
"Marybank to Newvalley",
"Elgin South Lesmurdie",
"Govan and Linthouse",
"Peebles North",
"Grampian",
"Na h-Eileanan Siar",
"Perth and Kinross",
"Dunoon",
"Arbroath East and Lunan",
"East Lothian",
"Hamilton, Larkhall and Stonehouse",
"Banff"),
return = "code"),
c(paste("S13000358, S13001614, S19000012, S19000846,",
"S19001492, S20000010, S20000674, S20001190"),
"S01002363",
"S01004303",
"S02000656, S02001856",
"S02001042, S02002293",
"S08000006, S08000020",
"S12000013",
"S12000024, S12000048, S37000023, S37000033",
paste("S02000135, S02001386, S13002522, S19000059,",
"S19000841, S19001487, S20000049, S20000671,",
"S20001187"),
"S13002514, S13002873",
"S12000010, S14000020, S16000025, S16000102, S37000010",
"S16000124",
paste("S02000099, S02001326, S13001291, S19000291,",
"S19000682, S19001326, S20000262, S20000548,",
"S20001064, S22000004")))
})

test_that("Handles NA input values correctly", {
expect_true(is.na(match_area(NA)))
expect_true(is.na(match_area(NA, return = "code")))
expect_equal(match_area(c("S13002781", NA, NA, "S13003089")),
c("Ayr North", NA, NA, "Ayr North"))
expect_equal(match_area(c(NA, "Eilean a' Ch\U00E8o", "Eilean a' Ch\U00E8o"),
return = "code"),
c(NA, "S13002672, S13002999", "S13002672, S13002999"))
})

test_that("Produces warnings for geography codes of invalid length", {
Expand Down

0 comments on commit 243d0d9

Please sign in to comment.