mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-12-25 04:43:03 +03:00
Add a test case.
This commit is contained in:
parent
3c690106f4
commit
dedeb0725d
@ -630,6 +630,33 @@ Body: """)
|
||||
]
|
||||
)
|
||||
]
|
||||
, test "it ignores unused cache" <|
|
||||
\() ->
|
||||
startWithHttpCache
|
||||
[ ( { url = "https://this-is-never-used.example.com/"
|
||||
, method = "GET"
|
||||
, headers = []
|
||||
, body = StaticHttpBody.EmptyBody
|
||||
}
|
||||
, """{"stargazer_count":86}"""
|
||||
)
|
||||
]
|
||||
[ ( []
|
||||
, StaticHttp.get (Secrets.succeed "https://api.github.com/repos/dillonkearns/elm-pages") starDecoder
|
||||
)
|
||||
]
|
||||
|> ProgramTest.simulateHttpOk
|
||||
"GET"
|
||||
"https://api.github.com/repos/dillonkearns/elm-pages"
|
||||
"""{ "stargazer_count": 86 }"""
|
||||
|> expectSuccess
|
||||
[ ( ""
|
||||
, [ ( get "https://api.github.com/repos/dillonkearns/elm-pages"
|
||||
, """{"stargazer_count":86}"""
|
||||
)
|
||||
]
|
||||
)
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user