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