mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
OrderChangeManager: Deal with unlimited quotas correctly
This commit is contained in:
@@ -188,6 +188,14 @@ class OrderChangeManagerTests(TestCase):
|
||||
def test_empty(self):
|
||||
self.ocm.commit()
|
||||
|
||||
def test_quota_unlimited(self):
|
||||
q = self.event.quotas.create(name='Test', size=None)
|
||||
q.items.add(self.shirt)
|
||||
self.ocm.change_item(self.op1, self.shirt, None)
|
||||
self.ocm.commit()
|
||||
self.op1.refresh_from_db()
|
||||
assert self.op1.item == self.shirt
|
||||
|
||||
def test_quota_full(self):
|
||||
q = self.event.quotas.create(name='Test', size=0)
|
||||
q.items.add(self.shirt)
|
||||
|
||||
Reference in New Issue
Block a user