Skip to content

Commit a127692

Browse files
committed
add test, bump version, update news
1 parent 53e4aee commit a127692

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: plotly
22
Title: Create Interactive Web Graphics via Plotly's JavaScript Graphing Library
3-
Version: 2.0.12
3+
Version: 2.0.13
44
Authors@R: c(person("Carson", "Sievert", role = c("aut", "cre"),
55
email = "[email protected]"),
66
person("Chris", "Parmer", role = c("aut", "cph"),

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2.0.13 -- 12 Dec 2015
2+
3+
Fix #286
4+
15
2.0.12 -- 11 Dec 2015
26

37
Fix #221

tests/testthat/test-ggplot-boxplot.R

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,20 @@ test_that("you can make a boxplot for a distribution of datetimes", {
4242
expect_identical(L$data[[1]]$type, "box")
4343
expect_identical(L$data[[1]]$y, as.character(df$y))
4444
})
45+
46+
dat <- data.frame(
47+
cond = factor(rep(c("A", "B", "C", "D"), each = 200)),
48+
col = factor(rep(c("C1", "C2"), each = 400)),
49+
rating = c(rnorm(200), rnorm(200, mean=.8), rnorm(200, mean=.4), rnorm(200, mean=.2))
50+
)
51+
g <- ggplot(dat, aes(x = cond, y = rating)) +
52+
geom_boxplot(outlier.shape = NA, aes(fill = col))
53+
54+
test_that("correct # of unique fillcolors", {
55+
L <- save_outputs(g, "boxplot-fillcolor")
56+
expect_equal(length(L$data), 4)
57+
expect_identical(L$data[[1]]$type, "box")
58+
fills <- sapply(l$data, "[[", "fillcolor")
59+
expect_equal(length(unique(fills)), length(unique(dat$col)))
60+
})
61+

0 commit comments

Comments
 (0)