This repository has been archived by the owner on Feb 8, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 308
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8799c69
commit 8eba761
Showing
2 changed files
with
7 additions
and
6 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
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 |
---|---|---|
|
@@ -13,16 +13,17 @@ def check(self, choice=0): | |
self.css('input[type=radio]')[choice].click() | ||
self.css('button')[0].click() | ||
assert self.has_element('.notification.notification-success', 1) | ||
assert self.has_text('Check [email protected] for a confirmation link.') | ||
assert self.has_text('Check your inbox for a verification link.') | ||
return self.db.one('select address from claims c join emails e on c.nonce = e.nonce') | ||
|
||
def test_appears_to_work(self): | ||
self.make_package() | ||
self.check() | ||
assert self.check() == '[email protected]' | ||
|
||
def test_works_when_there_are_multiple_addresses(self): | ||
self.make_package(emails=['[email protected]', '[email protected]']) | ||
self.check() | ||
assert self.check() == '[email protected]' | ||
|
||
def test_can_send_to_second_email(self): | ||
self.make_package(emails=['bob@example.com', 'alice@example.com']) | ||
self.check(choice=1) | ||
self.make_package(emails=['alice@example.com', 'bob@example.com']) | ||
assert self.check(choice=1) == '[email protected]' |