Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test errors and warnings #164

Merged
merged 2 commits into from
Nov 15, 2020
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions test/adapter_httpc_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ defmodule ExVCR.Adapter.HttpcTest do
ExVCR.Actor.CurrentRecorder.default_state()
|> ExVCR.Actor.CurrentRecorder.set()
end
url = "http://localhost:#{@port}/server" |> to_char_list()
url = "http://localhost:#{@port}/server" |> to_charlist()
{:ok, result} = :httpc.request(url)
{{_http_version, status_code, _reason_phrase}, _headers, _body} = result
assert status_code == 200
end

test "passthrough works after cassette has been used" do
url = "http://localhost:#{@port}/server" |> to_char_list()
url = "http://localhost:#{@port}/server" |> to_charlist()
use_cassette "httpc_get_localhost" do
{:ok, result} = :httpc.request(url)
{{_http_version, status_code, _reason_phrase}, _headers, _body} = result
Expand Down
4 changes: 2 additions & 2 deletions test/adapter_ibrowse_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ defmodule ExVCR.Adapter.IBrowseTest do
ExVCR.Actor.CurrentRecorder.default_state()
|> ExVCR.Actor.CurrentRecorder.set()
end
url = "http://localhost:#{@port}/server" |> to_char_list()
url = "http://localhost:#{@port}/server" |> to_charlist()
{:ok, status_code, _headers, _body} = :ibrowse.send_req(url, [], :get)
assert status_code == '200'
end

test "passthrough works after cassette has been used" do
url = "http://localhost:#{@port}/server" |> to_char_list()
url = "http://localhost:#{@port}/server" |> to_charlist()
use_cassette "ibrowse_get_localhost" do
{:ok, status_code, _headers, _body} = :ibrowse.send_req(url, [], :get)
assert status_code == '200'
Expand Down
2 changes: 1 addition & 1 deletion test/recorder_httpc_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ defmodule ExVCR.RecorderHttpcTest do
ExVCR.Config.response_headers_blacklist(["Date"])
use_cassette "remove_blacklisted_headers" do
{:ok, {_, headers, _}} = :httpc.request(@url)
assert headers == [{'server', 'Cowboy'}, {'content-length', '13'}]
assert Enum.sort(headers) == Enum.sort([{'server', 'Cowboy'}, {'content-length', '13'}])
end
ExVCR.Config.response_headers_blacklist([])
end
Expand Down