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

Commit

Permalink
Failing test for including team members in payout
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitpaulk committed May 17, 2015
1 parent 13affb1 commit 8d0f16f
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/py/test_billing_payday.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,27 @@ def test_payout_ach_error_gets_recorded(self, ach_credit):
payday = self.fetch_payday()
assert payday['nach_failing'] == 1

@mock.patch('gratipay.billing.payday.ach_credit')
def test_payout_is_constrained_to_owners_and_payroll(self, ach):
team_owner = self.make_participant('team_owner', claimed_time='now',
last_ach_result='', is_suspicious=False)
team = self.make_team('gratiteam', owner=team_owner, is_approved=True)
alice = self.make_participant('alice', claimed_time='now', is_suspicious=False,
last_ach_result='')
bob = self.make_participant('bob', claimed_time='now', is_suspicious=False,
last_ach_result='')
team.add_member(bob)
self.make_exchange('balanced-cc', 20, 0, alice) # Alice shouldn't be paid out
self.make_exchange('balanced-cc', 30, 0, bob)
self.make_exchange('balanced-cc', 30, 0, team_owner)

Payday.start().payout()

assert ach.call_count == 2

# Check for specifics



class TestNotifyParticipants(EmailHarness):

Expand Down

0 comments on commit 8d0f16f

Please sign in to comment.