Skip to content

Commit

Permalink
Adding example for clicking a link with an amperstand
Browse files Browse the repository at this point in the history
  • Loading branch information
brynary committed Nov 19, 2008
1 parent dc52f07 commit 5a9c048
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spec/api/click_link_spec.rb
Expand Up @@ -5,6 +5,14 @@
@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>
Expand Down

0 comments on commit 5a9c048

Please sign in to comment.