mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 05:59:44 -04:00
Fix infinite loop in support flow
The support flow was using `yes` and `no` to mean emergency/not emergency. But not in all places – in one place it was using `True`/`False` instead. We were treating anything other than `yes`/`no` as a non-answer, which means ask the question again. Because of the `True`/`False` thing, there was no way of the user providing a valid `yes`/`no` answer. Which means that we just kept asking them the question again and again and they got stuck in a loop.
This commit is contained in:
@@ -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})
|
||||
|
||||
Reference in New Issue
Block a user