added spec for click links by title - functionality is already done

This commit is contained in:
Andrew Premdas 2009-03-13 12:09:24 +00:00
parent 62491121c1
commit 742db2d910
1 changed files with 21 additions and 0 deletions

View File

@ -101,6 +101,27 @@ describe "click_link" do
webrat_session.should_receive(:get).with("/page", {})
click_link /_text_/
end
it "should click links by title" do
with_html <<-HTML
<html>
<a title="piddle" href="/page">Link text</a>
</html>
HTML
webrat_session.should_receive(:get).with("/page", {})
click_link 'piddle'
end
it "should click links by title regex" do
with_html <<-HTML
<html>
<a title="piddlediddle" href="/page">Link text</a>
</html>
HTML
webrat_session.should_receive(:get).with("/page", {})
click_link /iddle/
end
it "should click rails javascript links with authenticity tokens" do
with_html <<-HTML