mirror of
https://github.com/pretix/pretix.git
synced 2026-08-15 11:36:27 +00:00
Gift cards: Improved support for cross-organizer acceptance (#3311)
Co-authored-by: Martin Gross <martin@pc-coholic.de>
This commit is contained in:
co-authored by
Martin Gross
parent
b3c917925c
commit
f8be8296dd
@@ -293,6 +293,19 @@ def test_giftcard_transact_cross_organizer(token_client, organizer, event, other
|
||||
assert other_giftcard.transactions.last().acceptor == organizer
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_giftcard_transact_cross_organizer_inactive(token_client, organizer, event, other_giftcard):
|
||||
organizer.gift_card_issuer_acceptance.update(active=False)
|
||||
resp = token_client.post(
|
||||
'/api/v1/organizers/{}/giftcards/{}/transact/?include_accepted=true'.format(organizer.slug, other_giftcard.pk),
|
||||
{
|
||||
'value': '10.00',
|
||||
},
|
||||
format='json'
|
||||
)
|
||||
assert resp.status_code == 404
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_giftcard_transact_min_zero(token_client, organizer, event, giftcard):
|
||||
resp = token_client.post(
|
||||
|
||||
Reference in New Issue
Block a user