Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Status code and headers are wrong after redirect

  • Loading branch information...
commit e531c1a715101bcab60549b9051ebeea3a13822f 1 parent cae5119
@mhoran mhoran authored
Showing with 12 additions and 0 deletions.
  1. +12 −0 spec/driver_spec.rb
View
12 spec/driver_spec.rb
@@ -143,6 +143,7 @@ def in_iframe_request?
let(:driver) do
driver_for_app do
get '/target' do
+ headers 'X-Redirected' => 'true'
"<p>#{env['CONTENT_TYPE']}</p>"
end
@@ -187,6 +188,17 @@ def in_iframe_request?
driver.execute_script("window.history.replaceState({}, '', '/replaced-after-redirect')")
driver.current_url.should == driver_url(driver, "/replaced-after-redirect")
end
+
+ it "should make headers available through response_headers" do
+ driver.visit('/redirect-me')
+ driver.response_headers['X-Redirected'].should == "true"
+ end
+
+ it "should make the status code available through status_code" do
+ driver.visit('/redirect-me')
+ driver.status_code.should == 200
+ end
+
end
context "css app" do
Please sign in to comment.
Something went wrong with that request. Please try again.