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

Added a spec for default case

This commit is contained in:
Steve Hull 2013-02-15 11:16:00 -08:00
parent e0591fef5c
commit 6e6020910d

View file

@ -56,6 +56,15 @@ Capybara::SpecHelper.spec '#save_page' do
result.should include("<head><base href='http://example.com' />")
end
it "doesn't prepend base tag to pages when asset_host is nil" do
Capybara.asset_host = nil
@session.visit("/with_js")
path = @session.save_page
result = File.read(path)
result.should_not include("http://example.com")
end
it "doesn't prepend base tag to pages which already have it" do
@session.visit("/with_base_tag")
path = @session.save_page