diff --git a/mix.exs b/mix.exs index cc44ba1..2321bac 100644 --- a/mix.exs +++ b/mix.exs @@ -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 diff --git a/mix.lock b/mix.lock index 006dd6a..9b072ad 100644 --- a/mix.lock +++ b/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], []}, +} diff --git a/test/direct_test.exs b/test/direct_test.exs index 7e5be13..6b40de5 100644 --- a/test/direct_test.exs +++ b/test/direct_test.exs @@ -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 diff --git a/test/httpotion_test.exs b/test/httpotion_test.exs index 1653627..6d2bd7b 100644 --- a/test/httpotion_test.exs +++ b/test/httpotion_test.exs @@ -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