Merge with master.

This commit is contained in:
Nicholas Staples
2016-01-06 10:55:45 +00:00
115 changed files with 1067 additions and 12705 deletions

View File

@@ -0,0 +1,6 @@
def test_should_show_recent_jobs_on_dashboard(notifications_admin):
response = notifications_admin.test_client().get('/dashboard')
assert response.status_code == 200
assert 'Test message 1' in response.get_data(as_text=True)
assert 'Asdfgg' in response.get_data(as_text=True)

View File

@@ -0,0 +1,22 @@
def test_should_return_list_of_all_jobs(notifications_admin):
response = notifications_admin.test_client().get('/jobs')
assert response.status_code == 200
assert 'Test message 1' in response.get_data(as_text=True)
assert 'Final reminder' in response.get_data(as_text=True)
def test_should_show_page_for_one_job(notifications_admin):
response = notifications_admin.test_client().get('/jobs/job')
assert response.status_code == 200
assert 'dispatch_20151114.csv' in response.get_data(as_text=True)
assert 'Test message 1' in response.get_data(as_text=True)
def test_should_show_page_for_one_notification(notifications_admin):
response = notifications_admin.test_client().get('/jobs/job/notification/3')
assert response.status_code == 200
assert 'Text message' in response.get_data(as_text=True)
assert '+44 7700 900 522' in response.get_data(as_text=True)

View File

@@ -0,0 +1,27 @@
def test_should_return_sms_template_picker(notifications_admin):
response = notifications_admin.test_client().get('/sms/send')
assert response.status_code == 200
assert 'Choose text message template' in response.get_data(as_text=True)
def test_should_redirect_to_sms_check_page(notifications_admin):
response = notifications_admin.test_client().post('/sms/send')
assert response.status_code == 302
assert response.location == 'http://localhost/sms/check'
def test_should_return_check_sms_page(notifications_admin):
response = notifications_admin.test_client().get('/sms/check')
assert response.status_code == 200
assert 'Check and confirm' in response.get_data(as_text=True)
assert 'Send 10 text messages' in response.get_data(as_text=True)
def test_should_redirect_to_job(notifications_admin):
response = notifications_admin.test_client().post('/sms/check')
assert response.status_code == 302
assert response.location == 'http://localhost/jobs/job'

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'