diff --git a/app/main/views/templates.py b/app/main/views/templates.py index a3827a4b5..320869ebd 100644 --- a/app/main/views/templates.py +++ b/app/main/views/templates.py @@ -108,6 +108,7 @@ def start_tour(service_id, template_id): @main.route("/services//templates", methods=['GET', 'POST']) @main.route("/services//templates/folders/", methods=['GET', 'POST']) @main.route("/services//templates/", methods=['GET', 'POST']) +@main.route("/services//templates/all/folders/", methods=['GET', 'POST']) @main.route("/services//templates//folders/", methods=['GET', 'POST']) @user_has_permissions() def choose_template(service_id, template_type='all', template_folder_id=None): diff --git a/tests/app/main/test_permissions.py b/tests/app/main/test_permissions.py index a98617722..5303c5f9c 100644 --- a/tests/app/main/test_permissions.py +++ b/tests/app/main/test_permissions.py @@ -422,7 +422,7 @@ def format_decorators(decorators, indent=8): def test_code_to_extract_decorators_works_with_known_examples(): assert ( 'templates.choose_template', - ['main.route', 'main.route', 'main.route', 'main.route', 'user_has_permissions'], + ['main.route', 'main.route', 'main.route', 'main.route', 'main.route', 'user_has_permissions'], ) in list( get_routes_and_decorators(SERVICE_ID_ARGUMENT) ) diff --git a/tests/app/main/views/test_template_folders.py b/tests/app/main/views/test_template_folders.py index c93e70662..2e1c1217f 100644 --- a/tests/app/main/views/test_template_folders.py +++ b/tests/app/main/views/test_template_folders.py @@ -268,6 +268,17 @@ def _folder(name, folder_id=None, parent=None, users_with_permission=None): [], 'This folder is empty', ), + ( + 'folder_two – Templates – service one – GOV.UK Notify', + 'Templates folder_two', + [{'template_type': 'all'}], + {'template_folder_id': FOLDER_TWO_ID, 'template_type': 'all'}, + ['Email', 'Text message', 'Letter'], + [], + [], + [], + 'This folder is empty', + ), ] ) def test_should_show_templates_folder_page(