Skip to content

Commit b683d9a

Browse files
committed
Add spec for jaswope#25
1 parent 0be2747 commit b683d9a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

spec/rack/reverse_proxy_spec.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,15 @@ def app
6363
expect(last_response.body).to eq("Proxied App2")
6464
end
6565

66+
it "returns headers from proxied app as strings" do
67+
stub_request(:get, "http://example.com/test").to_return(
68+
:body => "Proxied App",
69+
:headers => { "Proxied-Header" => "TestValue" }
70+
)
71+
get "/test"
72+
expect(last_response.headers["Proxied-Header"]).to eq("TestValue")
73+
end
74+
6675
it "sets the Host header w/o default port" do
6776
stub_request(:any, "example.com/test/stuff")
6877
get "/test/stuff"

0 commit comments

Comments
 (0)