Skip to content

Commit

Permalink
Add extra test
Browse files Browse the repository at this point in the history
  • Loading branch information
thbar committed Nov 9, 2024
1 parent 499c8cc commit eb3b5c3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions apps/transport/test/transport/availability_checker_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@ defmodule Transport.AvailabilityCheckerTest do
assert AvailabilityChecker.available?("SIRI", "url303")
end

test "500 response (regular)" do
Transport.HTTPoison.Mock
|> expect(:get, fn "url500", [], [follow_redirect: true] ->
{:ok, %HTTPoison.Response{status_code: 500, body: "utter failure"}}
end)

refute AvailabilityChecker.available?("SIRI", "url500")
end

test "500 response (but with SOAP body)" do
Transport.HTTPoison.Mock
|> expect(:get, fn "url500soap", [], [follow_redirect: true] ->
Expand Down

0 comments on commit eb3b5c3

Please sign in to comment.