Skip to content
Snippets Groups Projects
Commit 2b3f90be authored by Todd Dembrey's avatar Todd Dembrey
Browse files

Add a test for the user submitting a form

parent 721800bf
No related branches found
No related tags found
No related merge requests found
...@@ -109,6 +109,17 @@ class TestApplicantSubmissionView(BaseSubmissionViewTestCase): ...@@ -109,6 +109,17 @@ class TestApplicantSubmissionView(BaseSubmissionViewTestCase):
response = self.get_page(submission, 'edit') response = self.get_page(submission, 'edit')
self.assertContains(response, submission.title) self.assertContains(response, submission.title)
def test_can_submit_submission(self):
submission = ApplicationSubmissionFactory(user=self.user, draft_proposal=True)
old_status = submission.status
response = self.post_page(submission, {'submit': True, **submission.raw_data}, 'edit')
url = self.url_from_pattern('funds:submissions:detail', kwargs={'pk': submission.id})
self.assertRedirects(response, url)
submission = self.refresh(submission)
self.assertNotEqual(old_status, submission.status)
def test_gets_draft_on_edit_submission(self): def test_gets_draft_on_edit_submission(self):
submission = ApplicationSubmissionFactory(user=self.user, draft_proposal=True) submission = ApplicationSubmissionFactory(user=self.user, draft_proposal=True)
draft_revision = ApplicationRevisionFactory(submission=submission) draft_revision = ApplicationRevisionFactory(submission=submission)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment