forked from hotsh/rstat.us
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Making these tests a bit more specific than matching the body, which …
…can sometimes match an error page
- Loading branch information
1 parent
5b37ed9
commit 115e2d4
Showing
1 changed file
with
8 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |