Fix tests in 7 and 8

This commit is contained in:
Richard Feldman
2016-04-03 08:16:38 -07:00
parent 1eacda4fa4
commit dfbff3f448
4 changed files with 26 additions and 2 deletions

View File

@@ -32,4 +32,20 @@ all =
, { id = 3, name = "bar", stars = 77 }
]
)
, test "they result in an error for invalid JSON"
<| let
response =
"""{ "pizza": [] }"""
isErrorResult result =
case result of
Ok _ ->
False
Err _ ->
True
in
assertEqual
True
(isErrorResult (decodeString responseDecoder response))
]