diff options
Diffstat (limited to 'website/sandbox/shift-time/Spec.hs')
-rw-r--r-- | website/sandbox/shift-time/Spec.hs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/website/sandbox/shift-time/Spec.hs b/website/sandbox/shift-time/Spec.hs new file mode 100644 index 000000000000..dcb28248b380 --- /dev/null +++ b/website/sandbox/shift-time/Spec.hs @@ -0,0 +1,17 @@ +-------------------------------------------------------------------------------- +module Spec where +-------------------------------------------------------------------------------- +import RIO +import Test.Hspec +import Test.QuickCheck +import Main hiding (main) + +import qualified RIO.Text as Text +-------------------------------------------------------------------------------- + +main :: IO () +main = hspec $ do + describe "Main" $ do + it "handles seconds" $ do + property $ \x -> parseTime (Text.concat [x & show & Text.pack, "s"]) == + (Just defaultShiftTimeRequest { shiftSeconds = x }) |