Adding example for clicking a link with an amperstand
This commit is contained in:
parent
dc52f07a9f
commit
5a9c048dfb
@ -5,6 +5,14 @@ describe "click_link" do
|
|||||||
@session = Webrat::TestSession.new
|
@session = Webrat::TestSession.new
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "should click links with ampertands" do
|
||||||
|
@session.response_body = <<-EOS
|
||||||
|
<a href="/page">Save & go back</a>
|
||||||
|
EOS
|
||||||
|
@session.should_receive(:get).with("/page", {})
|
||||||
|
@session.click_link "Save & go back"
|
||||||
|
end
|
||||||
|
|
||||||
it "should use get by default" do
|
it "should use get by default" do
|
||||||
@session.response_body = <<-EOS
|
@session.response_body = <<-EOS
|
||||||
<a href="/page">Link text</a>
|
<a href="/page">Link text</a>
|
||||||
|
Loading…
Reference in New Issue
Block a user