1test_that("Can't update units", { 2 x <- hms(minutes = 3) 3 expect_equal(units(x), "secs") 4 expect_warning(units(x) <- "mins", "always uses seconds") 5 expect_equal(units(x), "secs") 6 expect_warning(units(x) <- "secs", NA) 7 expect_equal(units(x), "secs") 8}) 9