aboutsummaryrefslogtreecommitdiff
path: root/challenge-100/lance-wicks/elm/tests/Example.elm
blob: 64c70d1337e654f72d7ea9559dc8ad438b849a70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
module Example exposing (..)

import Expect exposing (Expectation)
import Fun exposing (convert)
import Fuzz exposing (Fuzzer, int, list, string)
import Test exposing (..)


suite : Test
suite =
    describe "Fun"
        [ test "convert 07:15" <|
            \_ ->
                let
                    got =
                        convert "07:15"
                in
                Expect.equal got "07:15am"
        , test "convert 05:15pm" <|
            \_ ->
                let
                    got =
                        convert "05:15 pm"
                in
                Expect.equal got "17:15"
        , test "convert 19:15" <|
            \_ ->
                let
                    got =
                        convert "19:15"
                in
                Expect.equal got "07:15pm"
        , test "convert 09:15" <|
            \_ ->
                let
                    got =
                        convert "09:15 am"
                in
                Expect.equal got "09:15"
        ]