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.
Failing ttw test for sending a confirmation link
- Loading branch information
1 parent
8fb44a7
commit 6a4b1a1
Showing
4 changed files
with
21 additions
and
3 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 |
---|---|---|
|
@@ -181,7 +181,8 @@ def make_team(self, *a, **kw): | |
return team | ||
|
||
|
||
def make_package(self, package_manager, name, description, emails): | ||
def make_package(self, package_manager='npm', name='foo', description='Foo', | ||
emails=['[email protected]']): | ||
"""Factory for packages. | ||
""" | ||
self.db.one( 'INSERT INTO packages (package_manager, name, description, emails) ' | ||
|
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 |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
class TestClaimingWorkflow(Harness): | ||
|
||
def setUp(self): | ||
self.make_package('npm', 'foo', 'The foo package', ['[email protected]']) | ||
self.make_package() | ||
|
||
def test_anon_gets_signin_page_from_unclaimed(self): | ||
body = self.client.GET('/on/npm/foo/').body | ||
|
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import absolute_import, division, print_function, unicode_literals | ||
|
||
from gratipay.testing import BrowserHarness | ||
|
||
|
||
class Tests(BrowserHarness): | ||
|
||
def test_sending_a_confirmation_email_works(self): | ||
self.make_package() | ||
self.make_participant('alice', claimed_time='now') | ||
self.sign_in('alice') | ||
self.visit('/on/npm/foo/') | ||
self.css('input[type=radio]').click() | ||
self.css('button').click() | ||
assert self.has_element('.notification.notification-success', 1) | ||
assert self.has_text('A confirmation email has been sent') |
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