Skip to content

Commit cd17e69

Browse files
committed
test for deprecation messages
1 parent 1bd22b7 commit cd17e69

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

tests/testthat/test-function-args.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ test_that("geom_xxx and GeomXxx$draw arg defaults match", {
1313
geom_fun_names,
1414
c("geom_map", "geom_sf", "geom_smooth", "geom_column", "geom_area",
1515
"geom_density", "annotation_custom", "annotation_map", "annotation_raster",
16-
"annotation_id", "geom_errobarh")
16+
"annotation_id", "geom_errorbarh")
1717
)
1818

1919
# For each geom_xxx function and the corresponding GeomXxx$draw and
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
test_that("geom_errorbarh throws deprecation messages", {
2+
3+
lifecycle::expect_deprecated(geom_errorbarh())
4+
5+
p <- ggplot(
6+
data.frame(y = "A", min = 0, max = 10),
7+
aes(y = y, xmin = min, xmax = max)
8+
) +
9+
layer(
10+
geom = "errorbarh",
11+
stat = "identity",
12+
position = "identity"
13+
)
14+
15+
lifecycle::expect_deprecated(ggplot_build(p))
16+
})

0 commit comments

Comments
 (0)