Merge pull request #1176 from alphagov/fix-support-loop

Fix infinite loop in support flow
This commit is contained in:
Chris Hill-Scott
2017-03-07 10:38:58 +00:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -26,7 +26,7 @@ def triage():
return redirect(url_for(
'.feedback',
ticket_type='problem',
severe=(form.severe.data == 'yes')
severe=form.severe.data
))
return render_template(
'views/support/triage.html',

View File

@@ -340,8 +340,8 @@ def test_in_business_hours(when, is_in_business_hours):
@pytest.mark.parametrize('choice, expected_redirect_param', [
('yes', True),
('no', False),
('yes', 'yes'),
('no', 'no'),
])
def test_triage_redirects_to_correct_url(client, choice, expected_redirect_param):
response = client.post(url_for('main.triage'), data={'severe': choice})