Fix partial PATCH for gift cards (PRETIXEU-75P)

This commit is contained in:
Raphael Michel
2022-09-12 12:59:39 +02:00
parent 948952875c
commit 865bd126f3
2 changed files with 25 additions and 13 deletions

View File

@@ -147,6 +147,17 @@ def test_giftcard_patch(token_client, organizer, event, giftcard):
assert giftcard.currency == "EUR"
assert not giftcard.testmode
resp = token_client.patch(
'/api/v1/organizers/{}/giftcards/{}/'.format(organizer.slug, giftcard.pk),
{
'value': '9.00',
},
format='json'
)
assert resp.status_code == 200
giftcard.refresh_from_db()
assert giftcard.value == Decimal('9.00')
@pytest.mark.django_db
def test_giftcard_patch_min_value(token_client, organizer, event, giftcard):