context("hours")
test_that("hours", {
hours <- pts_calc_hours(poistimesheets::timesheet)
expect_is(hours, "tbl_df")
expect_identical(colnames(hours), c("Member", "HoursPerDay", "Hours",
"ExtraHours", "VacationDays",
"UnpaidLeave",
"HealthDays", "PersonalPaid", "Billable"))
expect_identical(hours$Member, c(
"Evan Amies-Galonski", "Joseph Thorley", "Seb Dalgarno"))
expect_identical(hours$HoursPerDay, rep(7.5, 3))
expect_identical(hours$Hours, c(516.98, 564.85, 517.72))
expect_equal(hours$ExtraHours, c(6.98, 54.85, 7.72))
expect_identical(hours$VacationDays, c(2.7, 0, 5.5))
expect_equal(hours$HealthDays, c(1, 0, 2.3333333))
expect_equal(hours$PersonalPaid, c(0.00000000, 0.00501018, 0.14689413),
tolerance = 1e-07)
expect_equal(hours$Billable, c(0.8599227, 0.6572542, 0.8974844),
tolerance = 1e-07)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.