Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions test/jsonapi/plugs/content_type_negotiation_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@
refute conn.halted
end

test "passes request through if accept is */*" do

Check failure on line 39 in test/jsonapi/plugs/content_type_negotiation_test.exs

View workflow job for this annotation

GitHub Actions / Test (Elixir 1.18 OTP 27)

test passes request through if accept is */* (JSONAPI.ContentTypeNegotiationTest)

Check failure on line 39 in test/jsonapi/plugs/content_type_negotiation_test.exs

View workflow job for this annotation

GitHub Actions / Test (Elixir 1.17 OTP 27)

test passes request through if accept is */* (JSONAPI.ContentTypeNegotiationTest)

Check failure on line 39 in test/jsonapi/plugs/content_type_negotiation_test.exs

View workflow job for this annotation

GitHub Actions / Test (Elixir 1.19 OTP 27)

test passes request through if accept is */* (JSONAPI.ContentTypeNegotiationTest)
conn =
:post
|> conn("/example", "")
|> Plug.Conn.put_req_header("content-type", mime_type())
|> Plug.Conn.put_req_header("accept", "*/*")
|> ContentTypeNegotiation.call([])

refute conn.halted
end

test "passes request through if only accept header" do
conn =
:post
Expand Down
Loading