mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Use have_content over should match
This commit is contained in:
parent
4506b26f53
commit
9b2fb89522
1 changed files with 3 additions and 3 deletions
|
@ -72,18 +72,18 @@ Capybara::SpecHelper.spec '#visit' do
|
|||
it "should send a referer when following a link" do
|
||||
@session.visit '/referer_base'
|
||||
@session.find('//a[@href="/get_referer"]').click
|
||||
@session.body.should match %r{http://.*/referer_base}
|
||||
@session.should have_content %r{http://.*/referer_base}
|
||||
end
|
||||
|
||||
it "should preserve the original referer URL when following a redirect" do
|
||||
@session.visit('/referer_base')
|
||||
@session.find('//a[@href="/redirect_to_get_referer"]').click
|
||||
@session.body.should match %r{http://.*/referer_base}
|
||||
@session.should have_content %r{http://.*/referer_base}
|
||||
end
|
||||
|
||||
it "should send a referer when submitting a form" do
|
||||
@session.visit '/referer_base'
|
||||
@session.find('//input').click
|
||||
@session.body.should match %r{http://.*/referer_base}
|
||||
@session.should have_content %r{http://.*/referer_base}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue