Skip to content
Snippets Groups Projects
Commit 2cfa5ae4 authored by Erin Mullaney's avatar Erin Mullaney Committed by Todd Dembrey
Browse files

GH-961 add redirect test on agree action as well

parent ec99ba84
No related branches found
No related tags found
No related merge requests found
...@@ -263,10 +263,12 @@ class StaffReviewOpinionCase(BaseViewTestCase): ...@@ -263,10 +263,12 @@ class StaffReviewOpinionCase(BaseViewTestCase):
def test_can_add_opinion_to_others_review(self): def test_can_add_opinion_to_others_review(self):
staff = StaffFactory() staff = StaffFactory()
review = ReviewFactory(submission=self.submission, author=staff, recommendation_yes=True) review = ReviewFactory(submission=self.submission, author=staff, recommendation_yes=True)
self.post_page(review, {'agree': AGREE}) response = self.post_page(review, {'agree': AGREE})
self.assertTrue(review.opinions.first().opinion_display in Activity.objects.first().message) self.assertTrue('agrees' in Activity.objects.first().message)
self.assertEqual(ReviewOpinion.objects.all().count(), 1) self.assertEqual(ReviewOpinion.objects.all().count(), 1)
self.assertEqual(ReviewOpinion.objects.first().opinion, AGREE) self.assertEqual(ReviewOpinion.objects.first().opinion, AGREE)
url = self.url_from_pattern('apply:submissions:reviews:review', kwargs={'submission_pk': self.submission.pk, 'pk': review.id})
self.assertRedirects(response, url)
def test_disagree_opinion_redirects_to_review_form(self): def test_disagree_opinion_redirects_to_review_form(self):
staff = StaffFactory() staff = StaffFactory()
......
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