tests/testthat/test_geom_timeline_label.R

test_that("Test geom_timeline_label",
          {
            XMin <- lubridate::ymd('2000-01-01')
            XMax <- lubridate::ymd('2020-01-01')
            Plot <- readr::read_delim(system.file("extdata", "signif.txt", package = "TheCapstoneProject"), delim = '\t') %>%
              eq_clean_data() %>%
              eq_location_clean() %>%
              ggplot2::ggplot() +
              geom_timeline_label(aes(x = DATE, xmin = XMin, xmax = XMax, n_max = 5, label = LOCATION, size = EQ_PRIMARY, mag = EQ_PRIMARY, colour = TOTAL_DEATHS))
            expect_is(Plot, class = c("gg", "ggplot"))
          })
ekawabata/TheCapstoneProject documentation built on June 27, 2020, 7:58 a.m.