Add routing and pages for managing templates

So that users can see what it the flow is like to:
- add new templates
- edit existing templates
This commit is contained in:
Chris Hill-Scott
2015-12-20 00:00:01 +00:00
parent 5e0777b696
commit ba48707371
10 changed files with 124 additions and 69 deletions

View File

@@ -0,0 +1,17 @@
def test_should_return_list_of_all_templates(notifications_admin):
response = notifications_admin.test_client().get('/templates')
assert response.status_code == 200
def test_should_show_page_for_one_templates(notifications_admin):
response = notifications_admin.test_client().get('/templates/template')
assert response.status_code == 200
def test_should_redirect_when_saving_a_template(notifications_admin):
response = notifications_admin.test_client().post('/templates/template')
assert response.status_code == 302
assert response.location == 'http://localhost/templates'