aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlexander Strizhakov <alex.strizhakov@gmail.com>2020-03-03 17:32:59 +0300
committerAlexander Strizhakov <alex.strizhakov@gmail.com>2020-03-03 17:32:59 +0300
commit3723d723652b747b00fc26054101c15e39a5af18 (patch)
tree652fa8109bd2b44a21f741256246cc6342363613 /test
parent24bf5c4e89e6f97ed3d53157cead48c04015a51b (diff)
downloadpleroma-3723d723652b747b00fc26054101c15e39a5af18.tar.gz
proxy parse tests fix
Diffstat (limited to 'test')
-rw-r--r--test/http/connection_test.exs10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/http/connection_test.exs b/test/http/connection_test.exs
index 53ccbc9cd..37de11e7a 100644
--- a/test/http/connection_test.exs
+++ b/test/http/connection_test.exs
@@ -51,31 +51,31 @@ defmodule Pleroma.HTTP.ConnectionTest do
describe "parse_proxy/1 errors" do
test "ip without port" do
capture_log(fn ->
- assert Connection.parse_proxy("127.0.0.1") == {:error, :error_parsing_proxy}
+ assert Connection.parse_proxy("127.0.0.1") == {:error, :invalid_proxy}
end) =~ "parsing proxy fail \"127.0.0.1\""
end
test "host without port" do
capture_log(fn ->
- assert Connection.parse_proxy("localhost") == {:error, :error_parsing_proxy}
+ assert Connection.parse_proxy("localhost") == {:error, :invalid_proxy}
end) =~ "parsing proxy fail \"localhost\""
end
test "host with bad port" do
capture_log(fn ->
- assert Connection.parse_proxy("localhost:port") == {:error, :error_parsing_port_in_proxy}
+ assert Connection.parse_proxy("localhost:port") == {:error, :invalid_proxy_port}
end) =~ "parsing port in proxy fail \"localhost:port\""
end
test "ip with bad port" do
capture_log(fn ->
- assert Connection.parse_proxy("127.0.0.1:15.9") == {:error, :error_parsing_port_in_proxy}
+ assert Connection.parse_proxy("127.0.0.1:15.9") == {:error, :invalid_proxy_port}
end) =~ "parsing port in proxy fail \"127.0.0.1:15.9\""
end
test "as tuple without port" do
capture_log(fn ->
- assert Connection.parse_proxy({:socks5, :localhost}) == {:error, :error_parsing_proxy}
+ assert Connection.parse_proxy({:socks5, :localhost}) == {:error, :invalid_proxy}
end) =~ "parsing proxy fail {:socks5, :localhost}"
end