mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
Fix #406 -- Allow moving waiting list entries to the top or bottom
This commit is contained in:
@@ -104,6 +104,29 @@ def test_assign_single(client, env):
|
||||
assert wle.voucher
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_priority_single(client, env):
|
||||
client.login(email='dummy@dummy.dummy', password='dummy')
|
||||
wle = WaitingListEntry.objects.filter(voucher__isnull=True).last()
|
||||
assert wle.priority == 0
|
||||
|
||||
client.post('/control/event/dummy/dummy/waitinglist/', {
|
||||
'move_top': wle.pk
|
||||
})
|
||||
wle.refresh_from_db()
|
||||
assert wle.priority == 1
|
||||
client.post('/control/event/dummy/dummy/waitinglist/', {
|
||||
'move_top': wle.pk
|
||||
})
|
||||
wle.refresh_from_db()
|
||||
assert wle.priority == 2
|
||||
client.post('/control/event/dummy/dummy/waitinglist/', {
|
||||
'move_end': wle.pk
|
||||
})
|
||||
wle.refresh_from_db()
|
||||
assert wle.priority == -1
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_delete_single(client, env):
|
||||
client.login(email='dummy@dummy.dummy', password='dummy')
|
||||
|
||||
Reference in New Issue
Block a user