tests/testthat/test-logo.R

pos <- get_positions("CLQ", c(10, 50, 40))

test_that("we can add a Logo to a plot", {

  # this should only ever occur in ggtrack function
   <- ggplot(mapping = aes(x = 0:1, y = 1)) %>%
    ('files/ggtrack-logo.png', position = pos, height_tracker = 2, justification = 1)

  expect_type(, 'list')
  expect_s3_class(, 'gg')
  expect_s3_class(, 'ggplot')

})

test_that("we can add a Logo to a tracker", {
   <- make_tracker(add_git = FALSE) %>%
    ('files/ggtrack-logo.png', justification = 1)

  expect_type(, 'list')
  expect_s3_class(, 'tracker')

})
mrjoh3/ggtrack documentation built on Dec. 21, 2021, 10:08 p.m.