all repos

onasty @ 327757c9371a333d3436f0a204677742a04236cf

a one-time notes service

onasty/web/tests/UnitTests/Data/Credentiala.elm(view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
module UnitTests.Data.Credentiala exposing (suite)

import Data.Credentials
import Expect
import Json.Decode as Json
import Test exposing (Test, describe, test)


suite : Test
suite =
    describe "Data.Credentials"
        [ test "decode credentials" <|
            \_ ->
                """
                {
                    "access_token": "access.token.value",
                    "refresh_token": "refresh-token-value"
                }
                """
                    |> Json.decodeString Data.Credentials.decode
                    |> Expect.ok
        ]