github.com/pf-qiu/concourse/v6@v6.7.3-0.20201207032516-1f455d73275f/web/elm/tests/SubscriptionTests.elm (about)

     1  module SubscriptionTests exposing (all)
     2  
     3  import Expect
     4  import Message.Subscription as Subscription
     5  import Test exposing (Test, describe, test)
     6  
     7  
     8  all : Test
     9  all =
    10      describe "decodeHttpResponse"
    11          [ test "'timeout' means the request timed out" <|
    12              \_ ->
    13                  "timeout"
    14                      |> Subscription.decodeHttpResponse
    15                      |> Expect.equal Subscription.Timeout
    16          , test "'networkError' means there was a problem with the network" <|
    17              \_ ->
    18                  "networkError"
    19                      |> Subscription.decodeHttpResponse
    20                      |> Expect.equal Subscription.NetworkError
    21          , test "'browserError' means the browser blocked the request" <|
    22              \_ ->
    23                  "browserError"
    24                      |> Subscription.decodeHttpResponse
    25                      |> Expect.equal Subscription.BrowserError
    26          , test "'success' means success" <|
    27              \_ ->
    28                  "success"
    29                      |> Subscription.decodeHttpResponse
    30                      |> Expect.equal Subscription.Success
    31          , test "anything else means success" <|
    32              \_ ->
    33                  "banana"
    34                      |> Subscription.decodeHttpResponse
    35                      |> Expect.equal Subscription.Success
    36          ]