Skip to content

Commit ceb78cc

Browse files
committed
[coverage] add test for capitalizing with dashes
1 parent 530b0f1 commit ceb78cc

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

spec/rack/reverse_proxy_spec.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,16 @@ def app
5959
headers['status'].should be_nil
6060
end
6161

62+
it 'should format the headers with dashes correctly' do
63+
stub_request(:get, 'http://example.com/2test').to_return({:status => 301, :headers => {:status => '301 Moved Permanently', :"x-additional-info" => "something"}})
64+
65+
get '/2test'
66+
67+
headers = last_response.headers.to_hash
68+
headers['X-Additional-Info'].should == "something"
69+
headers['x-additional-info'].should be_nil
70+
end
71+
6272
describe "with non-default port" do
6373
def app
6474
Rack::ReverseProxy.new(dummy_app) do

0 commit comments

Comments
 (0)