-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into max-retry-payment
- Loading branch information
Showing
2 changed files
with
44 additions
and
0 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
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 |
---|---|---|
|
@@ -620,6 +620,35 @@ def test_get_memo(db): | |
|
||
get_memo(expense_group, Bill, workspace_id) | ||
|
||
expense_group = ExpenseGroup.objects.get(id=2) | ||
workspace_id = expense_group.workspace.id | ||
|
||
config = Configuration.objects.get(workspace_id=workspace_id) | ||
config.corporate_credit_card_expenses_object = 'CHARGE_CARD_TRANSACTION' | ||
config.save() | ||
|
||
expense_group.description['employee_email'] = '[email protected]' | ||
expense_group.save() | ||
|
||
memo = get_memo(expense_group, ChargeCardTransaction, workspace_id) | ||
assert memo == 'Corporate Card Expense by [email protected]' | ||
|
||
ChargeCardTransaction.create_charge_card_transaction(expense_group) | ||
|
||
memo = get_memo(expense_group, ChargeCardTransaction, workspace_id) | ||
assert memo == 'Corporate Card Expense by [email protected] - 1' | ||
|
||
for i in range(3): | ||
expense_group = ExpenseGroup.objects.get(id=i + 1) | ||
expense_group.description['employee_email'] = '[email protected]' | ||
expense_group.save() | ||
|
||
ChargeCardTransaction.create_charge_card_transaction(expense_group) | ||
|
||
memo = get_memo(expense_group, ChargeCardTransaction, workspace_id) | ||
assert memo == 'Corporate Card Expense by [email protected] - 3' | ||
|
||
|
||
def test_get_item_id_or_none(db, mocker): | ||
workspace_id = 1 | ||
|
||
|