diff --git a/js/gratipay/packages.js b/js/gratipay/packages.js index 675a0c4614..4fabc116d3 100644 --- a/js/gratipay/packages.js +++ b/js/gratipay/packages.js @@ -3,7 +3,7 @@ Gratipay.packages = {}; Gratipay.packages.post = function(e) { e.preventDefault(); var $this = $(this); - var action = 'add-email-and-claim-package'; + var action = 'start-verification'; var package_id = $('input[name=package_id]').val(); var email = $('input[name=email]:checked').val(); diff --git a/tests/ttw/test_package_claiming.py b/tests/ttw/test_package_claiming.py index f3eb02e969..2b2e6ab71a 100644 --- a/tests/ttw/test_package_claiming.py +++ b/tests/ttw/test_package_claiming.py @@ -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 alice@example.com 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() == 'alice@example.com' def test_works_when_there_are_multiple_addresses(self): self.make_package(emails=['alice@example.com', 'bob@example.com']) - self.check() + assert self.check() == 'alice@example.com' 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) == 'bob@example.com'