Skip to content

Commit

Permalink
Making these tests a bit more specific than matching the body, which …
Browse files Browse the repository at this point in the history
…can sometimes match an error page
  • Loading branch information
carols10cents committed May 18, 2012
1 parent 5b37ed9 commit 115e2d4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/acceptance/password_forgot_test.rb
Original file line number Diff line number Diff line change
@@ -9,7 +9,9 @@
fill_in "email", :with => "[email protected]"
click_button "Send"

assert_match "Your account could not be found, please check your email and try again.", page.body
within flash do
assert has_content? "Your account could not be found, please check your email and try again."
end
end

it "sets the reset password token" do
@@ -22,7 +24,11 @@
click_button "Send"

u = User.first(:email => "[email protected]")

refute u.perishable_token.nil?
assert_match "A link to reset your password has been sent to [email protected].", page.body
within "p" do
assert has_content? "A link to reset your password has been sent to [email protected]."
end
end
end
end

0 comments on commit 115e2d4

Please sign in to comment.