Skip to content

Commit

Permalink
Added tests
Browse files Browse the repository at this point in the history
  • Loading branch information
The1Penguin authored and sora-jp committed Jul 31, 2024
1 parent f406ec1 commit d536c7a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
18 changes: 17 additions & 1 deletion test/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ main = hspec $ do
)

describe "Cafe Linsen" $ it
"parses two blob of JSON without error"
"parses a blob of JSON without error"
(do
s1 <- BL.readFile "test/linsen1.json"
testFun
Expand All @@ -73,13 +73,29 @@ main = hspec $ do
]) (L.parse
(fromGregorian 2024 05 31)
(fromJust $ decode s1))
)

describe "Cafe Linsen" $ it
"parses a blob of JSON without error, that has no lunch"
(do
s2 <- BL.readFile "test/linsen2.json" -- Test that has no lunch
testFun (Left NoLunch)
(L.parse
(fromGregorian 2024 06 06)
(fromJust $ decode s2))
)


describe "Cafe Linsen" $ it
"parses a blob of JSON without error, that has the wrong week"
(do
s3 <- BL.readFile "test/linsen3.json"
testFun (Left NoLunch)
(L.parse
(fromGregorian 2024 06 26)
(fromJust $ decode s3))
)

describe "The Wijkander's"
$ it "Parses two blobs of HTML correctly on fridays"
$ do
Expand Down
Loading

0 comments on commit d536c7a

Please sign in to comment.