Skip to content
This repository has been archived by the owner on Jun 12, 2018. It is now read-only.

Commit

Permalink
Test that surveys edit form is rendered correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
hodgestar committed Jan 28, 2014
1 parent e2fb942 commit 5224c08
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions go/apps/surveys/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,23 @@ def test_show_running(self):
self.assertContains(
response, conv_helper.get_action_view_url('send_survey'))

def test_edit_get(self):
conv_helper = self.app_helper.create_conversation_helper()
response = self.client.get(conv_helper.get_view_url('edit'))
# poll_form
self.assertContains(response, "repeatable")
self.assertContains(response, "Can contacts interact repeatedly?")
self.assertContains(response, "case_sensitive")
self.assertContains(response,
"Are the valid responses for each question case"
" sensitive?")
# question forms
self.assertContains(response, "Question 1:")
self.assertContains(response, "questions-TOTAL_FORMS")
# completed survey forms
self.assertContains(response, "Closing Response 1:")
self.assertContains(response, "completed_response-TOTAL_FORMS")

def test_edit(self):
conv_helper = self.app_helper.create_conversation_helper()
response = self.client.post(conv_helper.get_view_url('edit'), {
Expand Down

0 comments on commit 5224c08

Please sign in to comment.