onasty/web/tests/UnitTests/Data/Note.elm(view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
module UnitTests.Data.Note exposing (suite)
import Data.Note
import Expect
import Json.Decode as D
import Test exposing (Test, describe, test)
suite : Test
suite =
describe "Data.Note"
[ test "decodeCreateResponse"
(\_ ->
"{\"slug\":\"the.note-slug\"}"
|> D.decodeString Data.Note.decodeCreateResponse
|> Expect.equal (Ok { slug = "the.note-slug" })
)
]
|