Commit 247fc2e4 authored by Pierre-Yves Chibon's avatar Pierre-Yves Chibon

Add test checking that the notification got added after updating the ticket's status

parent bda7f171
......@@ -481,6 +481,7 @@ class PagureFlaskIssuestests(tests.Modeltests):
'<option selected value="Fixed">Fixed</option>'
in output.data)
# Right status, wrong csrf
data['status'] = 'Fixed'
output = self.app.post(
'/test/issue/1/update', data=data, follow_redirects=True)
......@@ -496,6 +497,7 @@ class PagureFlaskIssuestests(tests.Modeltests):
'<option selected value="Fixed">Fixed</option>'
in output.data)
# working status update
data['csrf_token'] = csrf_token
output = self.app.post(
'/test/issue/1/update', data=data, follow_redirects=True)
......@@ -513,6 +515,10 @@ class PagureFlaskIssuestests(tests.Modeltests):
self.assertTrue(
'<option selected value="Fixed">Fixed</option>'
in output.data)
self.assertIn(
'<small><p><a href="/user/pingou"> @pingou</a> '
'changed the status to <code>Fixed</code></p></small>',
output.data)
# Add new comment
data = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment