mirror of
https://github.com/pretix/pretix.git
synced 2026-05-03 14:54:04 +00:00
Allow to add a text to gift card transactions
This commit is contained in:
@@ -149,6 +149,18 @@ def test_giftcard_transact(token_client, organizer, event, giftcard):
|
||||
assert resp.status_code == 200
|
||||
giftcard.refresh_from_db()
|
||||
assert giftcard.value == Decimal('33.00')
|
||||
resp = token_client.post(
|
||||
'/api/v1/organizers/{}/giftcards/{}/transact/'.format(organizer.slug, giftcard.pk),
|
||||
{
|
||||
'value': '10.00',
|
||||
'text': 'bla'
|
||||
},
|
||||
format='json'
|
||||
)
|
||||
assert resp.status_code == 200
|
||||
giftcard.refresh_from_db()
|
||||
assert giftcard.value == Decimal('43.00')
|
||||
assert giftcard.transactions.last().text == 'bla'
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
|
||||
Reference in New Issue
Block a user