diff --git a/tests/testthat/test-scales.R b/tests/testthat/test-scales.R index 9752a20..9de17cc 100644 --- a/tests/testthat/test-scales.R +++ b/tests/testthat/test-scales.R @@ -32,9 +32,7 @@ test_that('scale_colour_ghibli_d takes name args',{ }) test_that('scale_colour_ghibli_d fails as expected',{ - expect_error(base_color_plot + scale_colour_ghibli_d()) - - expect_error(base_color_plot + scale_colour_ghibli_d(name = 'PonyoMedium', direction = 2)) + throws_error(base_color_plot + scale_colour_ghibli_d(name = 'PonyoMedium', direction = 2)) }) @@ -59,7 +57,5 @@ test_that('scale_fill_ghibli_d takes palette args',{ }) test_that('scale_fill_ghibli_d fails as expected',{ - expect_error(base_fill_plot + scale_fill_ghibli_d()) - - expect_error(base_fill_plot + scale_fill_ghibli_d(name = 'PonyoMedium', direction = 2)) + throws_error(base_fill_plot + scale_fill_ghibli_d(name = 'PonyoMedium', direction = 2)) })