implemented Handlers.i

This commit is contained in:
2021-09-22 18:19:51 -04:00
parent 34ac2a2a00
commit 515109f45d
2 changed files with 29 additions and 1 deletions

View File

@@ -37,6 +37,7 @@ spec = do
editHostSpec
dropParamSpec
editParamSpec
incStrBySpec
textToUrlSpec :: Spec
textToUrlSpec = describe "textToUrl" $ mapM_
@@ -149,6 +150,20 @@ editParamSpec = describe "editParam" $ mapM_
, ( "c", Nothing )
]
incStrBySpec :: Spec
incStrBySpec = describe "incStrBy" $ mapM_
( \(n, str, expected) ->
context (show str ++ " + " ++ show n) $
it ("should be " ++ show expected) $
incStrBy n str `shouldBe` expected
)
-- number, string, expected
[ ( 2, "3", Just "5" )
, ( 2, "foo", Nothing )
, ( 2, "", Nothing )
]
simpleTxt :: T.Text
simpleTxt = "http://example.com/"