Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Here's a failing test for notify_participants
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwhitacre committed Apr 8, 2015
1 parent d73d422 commit c2cee2d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/py/test_billing_payday.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,3 +527,18 @@ def test_payout_ach_error(self, ach_credit):
Payday.start().payout()
payday = self.fetch_payday()
assert payday['nach_failing'] == 1


class TestNotifyParticipants(BalancedHarness):

@mock.patch.object(Payday, 'fetch_card_holds')
def test_it_notifies_participants(self, fch):
self.janet.set_tip_to(self.homer, D('10.00'))
fch.return_value = {}
Payday.start().run()

exchanges = self.db.one('SELECT * FROM exchanges')
assert exchanges['amount'] == D('10.00')

emails = self.db.one('SELECT * FROM email_queue')
assert emails['spt_name'] == 'charge_succeeded'

0 comments on commit c2cee2d

Please sign in to comment.