Skip to content

Commit 19f2ed6

Browse files
committed
Prep tests for next svglite release
1 parent 2663bb1 commit 19f2ed6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/testthat/test-ggsave.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ test_that("ggsave uses theme background as image background", {
5454
ggsave(path, p, device = "svg", width = 5, height = 5)
5555
img <- xml2::read_xml(path)
5656
# Find background rect in svg
57-
bg <- as.character(xml2::xml_find_first(img, xpath = "d1:rect/@style"))
57+
bg <- as.character(xml2::xml_find_first(img, xpath = "*/d1:rect/@style"))
5858
expect_true(grepl("fill: #00CCCC", bg))
5959
})
6060

@@ -69,7 +69,7 @@ test_that("ggsave can handle blank background", {
6969
theme(plot.background = element_blank())
7070
ggsave(path, p, device = "svg", width = 5, height = 5)
7171
img <- xml2::read_xml(path)
72-
bg <- as.character(xml2::xml_find_first(img, xpath = "d1:rect/@style"))
72+
bg <- as.character(xml2::xml_find_first(img, xpath = "*/d1:rect/@style"))
7373
expect_true(grepl("fill: none", bg))
7474
})
7575

0 commit comments

Comments
 (0)