Skip to content

Commit

Permalink
Fix tests for OTP 27
Browse files Browse the repository at this point in the history
  • Loading branch information
Cantido committed Jul 7, 2024
1 parent 0a23de1 commit 7817314
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 1 addition & 5 deletions test/liberator/resource_codec_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,8 @@ defmodule Liberator.ResourceCodecTest do
"identity" => BrokenEncoding
})

expected_message = """
The compression codec module Liberator.ResourceCodecTest.BrokenEncoding did not return a binary.
Compression codecs must return a binary.
expected_message = ~r/The compression codec module Liberator.ResourceCodecTest.BrokenEncoding did not return a binary\./

Liberator.ResourceCodecTest.BrokenEncoding.encode!/1 returned %{a: 1, b: 2}
"""

conn = conn(:get, "/")

Expand Down
3 changes: 2 additions & 1 deletion test/liberator/resource_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,8 @@ defmodule Liberator.ResourceTest do

assert conn.state == :sent
assert conn.status == 200
assert conn.resp_body == "%{a: 1, b: 2}"
assert conn.resp_body =~ "a: 1"
assert conn.resp_body =~ "b: 2"
end

defmodule OkTupleHandlerResource do
Expand Down

0 comments on commit 7817314

Please sign in to comment.