1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

Rack::Test now respects ports when changing hosts

This commit is contained in:
Jo Liss 2012-01-04 18:54:30 +01:00
parent 74d01a7b2b
commit 8c6ff16861
3 changed files with 4 additions and 2 deletions

View file

@ -4,6 +4,7 @@
* Test suite now passes on Ruby 1.8 [Jo Liss]
* #565: `require 'capybara/dsl'` is no longer necessary [Jo Liss]
* Rack::Test now respects ports when changing hosts [Jo Liss]
### Added

View file

@ -48,6 +48,9 @@ class Capybara::RackTest::Browser
if new_uri.host
@current_host = new_uri.scheme + '://' + new_uri.host
if new_uri.port != 80
@current_host << ":#{new_uri.port}"
end
end
if new_uri.relative?

View file

@ -52,7 +52,6 @@ shared_examples_for "current_url" do
end
it "is unaffected by following a relative link" do
pending 'reverts to port 80'
visit_host_links
@session.click_link("Relative Host")
should_be_on 0
@ -65,7 +64,6 @@ shared_examples_for "current_url" do
end
it "is unaffected by posting through a relative form" do
pending 'reverts to port 80'
visit_host_links
@session.click_button("Relative Host")
should_be_on 0