onasty/web/tests/UnitTests/Data/Error.elm(view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
module UnitTests.Data.Error exposing (suite)
import Data.Error
import Expect
import Json.Decode as Json
import Test exposing (Test, describe, test)
suite : Test
suite =
describe "Data.Error"
[ test "decode" <|
\_ ->
"""
{
"message": "some kind of an error"
}
"""
|> Json.decodeString Data.Error.decode
|> Expect.equal (Ok { message = "some kind of an error" })
]
|