about summary refs log blame commit diff
path: root/website/sandbox/shift-time/Spec.hs
blob: dcb28248b380931037023cd62cdbeef1a571bd00 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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 })