test_that("Expand Dates work", { expect_equal( expand_dates(data.frame(id = 1, start = as.Date('3/1/2015', format='%m/%d/%Y'), end = as.Date('3/15/2015', format='%m/%d/%Y')), start, end) %>% dplyr::filter(!is.na(period)) %>% dplyr::select(-id, -period), dplyr::tibble(end = as.Date(c('3/15/2015', '3/15/2015', '3/15/2015', '3/15/2015', '3/15/2015', '3/15/2015', '3/15/2015', '3/15/2015', '3/15/2015', '3/15/2015', '3/15/2015', '3/15/2015', '3/15/2015', '3/15/2015', '3/15/2015'), format='%m/%d/%Y'), date = as.Date(c('3/01/2015', '3/02/2015', '3/03/2015', '3/04/2015', '3/05/2015', '3/06/2015', '3/07/2015', '3/08/2015', '3/09/2015', '3/10/2015', '3/11/2015', '3/12/2015', '3/13/2015', '3/14/2015', '3/15/2015'), format='%m/%d/%Y'))) })