@@ -6,7 +6,7 @@ test_that("`funnel_plot()` works with input and returns expected list", {
66
77 a <- funnel_plot(dt , num , denom , group )
88 expect_type(a , " list" )
9- expect_type( a [[1 ]], " list " )
9+ expect_true(is_ggplot( a [[1 ]]) )
1010 expect_s3_class(a [[2 ]], " data.frame" )
1111 expect_s3_class(a [[3 ]], " data.frame" )
1212 expect_length(a [[3 ]]$ group ,6 )
@@ -16,7 +16,7 @@ test_that("`funnel_plot()` works with input and returns expected list", {
1616 title = " My test Funnel Plot" , multiplier = 100 , x_label = " Expected Values" ,
1717 y_label = " Standardised Ratio Test" , label = " outlier" , limit = 95 )
1818 expect_type(b , " list" )
19- expect_type( b [[1 ]], " list " )
19+ expect_true(is_ggplot( b [[1 ]]) )
2020 expect_s3_class(b [[2 ]], " data.frame" )
2121 expect_s3_class(b [[3 ]], " data.frame" )
2222 expect_length(b [[3 ]]$ group ,6 )
@@ -27,7 +27,7 @@ test_that("`funnel_plot()` works with input and returns expected list", {
2727 title = " My test Funnel Plot" , multiplier = 100 , x_label = " Expected Values" ,
2828 y_label = " Standardised Ratio Test" , label = " highlight" , limit = 95 , highlight = " a" )
2929 expect_type(c , " list" )
30- expect_type( c [[1 ]], " list " )
30+ expect_true(is_ggplot( c [[1 ]]) )
3131 expect_s3_class(c [[2 ]], " data.frame" )
3232 expect_s3_class(c [[3 ]], " data.frame" )
3333 expect_length(c [[3 ]]$ group ,6 )
@@ -40,7 +40,7 @@ test_that("`funnel_plot()` works with input and returns expected list", {
4040 y_label = " Standardised Ratio Test" , label = " both" , limit = 95 , x_range = c(5 ,250 )
4141 , y_range = c(0 , 200 ), highlight = " a" )
4242 expect_type(d , " list" )
43- expect_type( d [[1 ]], " list " )
43+ expect_true(is_ggplot( d [[1 ]]) )
4444 expect_s3_class(d [[2 ]], " data.frame" )
4545 expect_s3_class(d [[3 ]], " data.frame" )
4646 expect_length(d [[3 ]]$ group ,6 )
0 commit comments