On Thu, Aug 7, 2008 at 2:44 PM, Christian L.
[email protected] wrote:
why: the page that is analysed is a dummy page “You are being
Is it possible to check data in the second page?
What about something like:
Scenario: User enters a bookmark URL
Given I log in as a user
When I add ‘http://www.gotapi.com/rubyrails’ as a bookmark
Then I should see that has the ‘http://www.gotapi.com/rubyrails’
has been added to my bookmarks
I’d imagine the steps to look something like:
Given "I log in as a user" do
# do whatever to login
When I add $url as a bookmark do |url|
# fill out the new bookmmark form with the given url
# after submitting form handle redirects
Then "I should see that has the $url has been added to my
bookmarks" do |url|
# response should have url somewhere on page
follow_all_redirects looks like:
if response.content_type == "text/html"
follow_redirect! while response.redirect?
if md=response.body.match(/window.location.href = "([^"]+)"/)