Skip to content

Commit

Permalink
Update deps, support new error messages (timeout)
Browse files Browse the repository at this point in the history
  • Loading branch information
valpackett committed Feb 6, 2018
1 parent f3fa2f0 commit c887648
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion mix.exs
Expand Up @@ -25,7 +25,7 @@ defmodule HTTPotion.Mixfile do

defp deps do
[ {:ibrowse, "~> 4.4"},
{:ex_doc, "~> 0.16", only: [:dev, :test, :docs]} ]
{:ex_doc, "~> 0.18", only: [:dev, :test, :docs]} ]
end

defp package do
Expand Down
8 changes: 5 additions & 3 deletions mix.lock
@@ -1,3 +1,5 @@
%{"earmark": {:hex, :earmark, "1.2.3", "206eb2e2ac1a794aa5256f3982de7a76bf4579ff91cb28d0e17ea2c9491e46a4", [:mix], []},
"ex_doc": {:hex, :ex_doc, "0.16.2", "3b3e210ebcd85a7c76b4e73f85c5640c011d2a0b2f06dcdf5acdb2ae904e5084", [:mix], [{:earmark, "~> 1.1", [hex: :earmark, optional: false]}]},
"ibrowse": {:hex, :ibrowse, "4.4.0", "2d923325efe0d2cb09b9c6a047b2835a5eda69d8a47ed6ff8bc03628b764e991", [:rebar3], []}}
%{
"earmark": {:hex, :earmark, "1.2.4", "99b637c62a4d65a20a9fb674b8cffb8baa771c04605a80c911c4418c69b75439", [:mix], []},
"ex_doc": {:hex, :ex_doc, "0.18.2", "993e0a95e9fbb790ac54ea58e700b45b299bd48bc44b4ae0404f28161f37a83e", [:mix], [{:earmark, "~> 1.1", [hex: :earmark, optional: false]}]},
"ibrowse": {:hex, :ibrowse, "4.4.0", "2d923325efe0d2cb09b9c6a047b2835a5eda69d8a47ed6ff8bc03628b764e991", [:rebar3], []},
}
2 changes: 1 addition & 1 deletion test/direct_test.exs
Expand Up @@ -77,7 +77,7 @@ defmodule DirectTest do
end

test "exception" do
assert_raise HTTPotion.HTTPError, "econnrefused", fn ->
assert_raise HTTPotion.HTTPError, ~r/^econnrefused|req_timedout|timeout$/, fn ->
{:ok, pid} = HTTPotion.spawn_worker_process("localhost:1")
IO.puts HTTPotion.get!("localhost:1/lolwat", [direct: pid])
end
Expand Down
8 changes: 4 additions & 4 deletions test/httpotion_test.exs
Expand Up @@ -81,22 +81,22 @@ defmodule HTTPotionTest do
end

test "get exception" do
assert_raise HTTPotion.HTTPError, "econnrefused", fn ->
assert_raise HTTPotion.HTTPError, ~r/^econnrefused|req_timedout|timeout$/, fn ->
HTTPotion.get!("localhost:1")
end
end
test "put exception" do
assert_raise HTTPotion.HTTPError, "econnrefused", fn ->
assert_raise HTTPotion.HTTPError, ~r/^econnrefused|req_timedout|timeout$/, fn ->
HTTPotion.put!("localhost:1")
end
end
test "delete exception" do
assert_raise HTTPotion.HTTPError, "econnrefused", fn ->
assert_raise HTTPotion.HTTPError, ~r/^econnrefused|req_timedout|timeout$/, fn ->
HTTPotion.delete!("localhost:1")
end
end
test "post exception" do
assert_raise HTTPotion.HTTPError, "econnrefused", fn ->
assert_raise HTTPotion.HTTPError, ~r/^econnrefused|req_timedout|timeout$/, fn ->
HTTPotion.post!("localhost:1")
end
end
Expand Down

0 comments on commit c887648

Please sign in to comment.