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:
parent
e0591fef5c
commit
6e6020910d
1 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue