1
0
Fork 0
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:
Jonas Nicklas 2013-02-26 08:30:55 +01:00
parent 4506b26f53
commit 9b2fb89522

View file

@ -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