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 dues in payday.nusers
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitpaulk committed Oct 24, 2015
1 parent c3571fe commit 672b29e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/py/test_billing_payday.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,18 @@ def test_payday_doesnt_move_money_to_a_suspicious_account(self, fch):
assert obama.balance == D('0.00')
assert homer.balance == D('0.00')

@mock.patch.object(Payday, 'fetch_card_holds')
def test_nusers_includes_dues(self, fch):
Enterprise = self.make_team(is_approved=True)
self.obama.set_payment_instruction(Enterprise, '6.00') # below MINIMUM_CHARGE
fch.return_value = {}
Payday.start().run()

assert self.obama.get_due(Enterprise) == D('6.00')

nusers = self.db.one("SELECT nusers FROM paydays")
assert nusers == 1

@pytest.mark.xfail(reason="haven't migrated transfer_takes yet")
@mock.patch.object(Payday, 'fetch_card_holds')
@mock.patch('gratipay.billing.payday.create_card_hold')
Expand Down

0 comments on commit 672b29e

Please sign in to comment.