...
 
Commits (2)
......@@ -170,21 +170,23 @@ test_that('hrParams returns error if params do not match function params', {
fixed = FALSE
)
s4promise <- evaluate_promise(build_polys(
DT = DT,
projection = utm,
hrType = 'mcp',
hrParams = list(percent = 95),
coords = c('X', 'Y'),
id = 'ID'
))
expect_s4_class(
build_polys(
DT = DT,
projection = utm,
hrType = 'mcp',
hrParams = list(percent = 95),
coords = c('X', 'Y'),
id = 'ID'
),
s4promise$result,
'SpatialPolygonsDataFrame'
)
})
test_that('if hrParams NULL, warns', {
expect_message(
hrparamsnull <- evaluate_promise(
build_polys(
DT = DT,
projection = utm,
......@@ -192,7 +194,11 @@ test_that('if hrParams NULL, warns', {
hrParams = NULL,
coords = c('X', 'Y'),
id = 'ID'
),
)
)
expect_match(
hrparamsnull$messages,
'hrParams is not provided, using defaults'
)
......