Adding example for clicking a link with an amperstand

This commit is contained in:
Bryan Helmkamp 2008-11-18 20:41:14 -05:00
parent dc52f07a9f
commit 5a9c048dfb
1 changed files with 8 additions and 0 deletions

View File

@ -5,6 +5,14 @@ describe "click_link" do
@session = Webrat::TestSession.new
end
it "should click links with ampertands" do
@session.response_body = <<-EOS
<a href="/page">Save &amp; go back</a>
EOS
@session.should_receive(:get).with("/page", {})
@session.click_link "Save & go back"
end
it "should use get by default" do
@session.response_body = <<-EOS
<a href="/page">Link text</a>