Fix #1675 -- Allow '0' as answer to number questions (#1732)

Co-authored-by: Raphael Michel <michel@rami.io>
This commit is contained in:
Felix Rindt
2020-07-28 16:32:06 +02:00
committed by GitHub
parent 89e8d3d12f
commit 80b6a3d27d
3 changed files with 5 additions and 3 deletions

View File

@@ -2660,7 +2660,7 @@ class QuestionsTestCase(BaseCheckoutTestCase, TestCase):
# Corrected request
response = self.client.post('/%s/%s/checkout/questions/' % (self.orga.slug, self.event.slug), {
'%s-question_%s' % (cr1.id, q1.id): '42',
'%s-question_%s' % (cr2.id, q1.id): '23',
'%s-question_%s' % (cr2.id, q1.id): '0',
'%s-question_%s' % (cr1.id, q2.id): 'Internet',
'%s-question_%s' % (cr2.id, q2.id): '',
'email': 'admin@localhost'
@@ -2750,6 +2750,7 @@ class QuestionsTestCase(BaseCheckoutTestCase, TestCase):
event=self.event, question='Why not?', type=Question.TYPE_TEXT,
required=True, dependency_question=self.q3, dependency_values=['False']
)
self.ticket.questions.add(self.q1)
self.ticket.questions.add(self.q2a)
self.ticket.questions.add(self.q2b)