Skip to content

Commit 1123f63

Browse files
committed
mix format
1 parent 8df27ac commit 1123f63

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/plug/rewrite_on_test.exs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ defmodule Plug.RewriteOnTest do
113113
assert conn.remote_ip == {0, 0, 0, 0, 0, 0, 0, 1}
114114
end
115115

116-
117116
test "rewrites remote_ip with a custom header" do
118117
conn =
119118
conn(:get, "http://example.com/")
@@ -144,7 +143,6 @@ defmodule Plug.RewriteOnTest do
144143
assert conn.remote_ip == {0, 0, 0, 0, 0, 0, 0, 1}
145144
end
146145

147-
148146
test "rewrites the host, the port, and the protocol" do
149147
conn =
150148
conn(:get, "http://example.com/")
@@ -158,16 +156,17 @@ defmodule Plug.RewriteOnTest do
158156
assert conn.scheme == :https
159157
end
160158

161-
162159
test "rewrites the host, the port, and the protocol with custom headers" do
163160
conn =
164161
conn(:get, "http://example.com/")
165162
|> put_req_header("custom-forwarded-host", "truessl.example.com")
166163
|> put_req_header("custom-forwarded-port", "3030")
167164
|> put_req_header("custom-forwarded-proto", "https")
168-
|> call([host: "custom-forwarded-host",
169-
port: "custom-forwarded-port",
170-
scheme: "custom-forwarded-proto"])
165+
|> call(
166+
host: "custom-forwarded-host",
167+
port: "custom-forwarded-port",
168+
scheme: "custom-forwarded-proto"
169+
)
171170

172171
assert conn.host == "truessl.example.com"
173172
assert conn.port == 3030
@@ -178,8 +177,9 @@ defmodule Plug.RewriteOnTest do
178177
assert_raise RuntimeError, "unknown rewrite: :x_forwarded_other", fn ->
179178
call(conn(:get, "http://example.com/"), :x_forwarded_other)
180179
end
180+
181181
assert_raise RuntimeError, "unknown rewrite: {:other, \"value\"}", fn ->
182-
call(conn(:get, "http://example.com/"), [other: "value"])
182+
call(conn(:get, "http://example.com/"), other: "value")
183183
end
184184
end
185185
end

0 commit comments

Comments
 (0)