Fix test case compiler errors.

This commit is contained in:
Dillon Kearns 2023-01-08 11:04:27 -08:00
parent a77787135d
commit 2ae58cc0ab

View File

@ -63,21 +63,17 @@ all =
_ ->
Expect.fail ("Expected BadStatus, got: " ++ Debug.toString result)
)
, BackendTask.Http.request
, BackendTask.Http.getWithOptions
{ url = "https://api.github.com/repos/dillonkearns/elm-pages"
, method = "GET"
, headers = []
, body = BackendTask.Http.emptyBody
, options =
Just
{ cacheStrategy = BackendTask.Http.IgnoreCache
, retries = 0
, timeoutInMs = Nothing
}
, cacheStrategy = Just BackendTask.Http.IgnoreCache
, cachePath = Nothing
, retries = Nothing
, timeoutInMs = Nothing
, expect =
BackendTask.Http.expectJson
(Decode.field "this-field-doesn't-exist" Decode.int)
}
(BackendTask.Http.expectJson
(Decode.field "this-field-doesn't-exist" Decode.int)
)
|> test "cache options"
(\result ->
case result of
@ -88,23 +84,19 @@ all =
_ ->
Expect.fail ("Expected BadStatus, got: " ++ Debug.toString result)
)
, BackendTask.Http.request
, BackendTask.Http.getWithOptions
{ url = "https://api.github.com/repos/dillonkearns/elm-pages"
, method = "GET"
, headers = []
, body = BackendTask.Http.emptyBody
, options =
Just
{ cacheStrategy = BackendTask.Http.ForceRevalidate
, retries = 0
, timeoutInMs = Nothing
}
, cacheStrategy = Just BackendTask.Http.ForceRevalidate
, cachePath = Nothing
, retries = Nothing
, timeoutInMs = Nothing
, expect =
BackendTask.Http.withMetadata Tuple.pair
(BackendTask.Http.expectJson
(Decode.field "stargazers_count" Decode.int)
)
}
(BackendTask.Http.withMetadata Tuple.pair
(BackendTask.Http.expectJson
(Decode.field "stargazers_count" Decode.int)
)
)
|> test "with metadata"
(\result ->
case result of