Skip to content

Commit f373125

Browse files
committed
add tests for plot_bycatch_guesses() #58
openjournals/joss-reviews#3888
1 parent d722aa2 commit f373125

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# testing plot_bycatch_guesses
2+
3+
test_that("Bycatch guesses produces ggplot object",
4+
{
5+
x <- plot_bycatch_guesses(highval = 55,medval = 35,lowval = 15,cv = 0.5,set_size = 12,color.palette = c("red","yellow","green"),lang = "en")
6+
expect_true(ggplot2::is.ggplot(x))
7+
})
8+
9+
test_that("Plot object contains correct language",
10+
{
11+
x <- plot_bycatch_guesses(highval = 55,medval = 35,lowval = 15,cv = 0.5,set_size = 12,color.palette = c("red","yellow","green"),lang = "es")
12+
expect_equal(x$labels$y, "Mortalidad de captura incidental")
13+
})

0 commit comments

Comments
 (0)