diff --git a/pagure/templates/file.html b/pagure/templates/file.html index 75a9f7a..7130305 100644 --- a/pagure/templates/file.html +++ b/pagure/templates/file.html @@ -145,6 +145,7 @@ repo=repo.name, username=username, namespace=repo.namespace, + identifier=branchname, filename=filename) | unicode }}" title="View git blame">Blame (\w+)\n') - # View in a branch + # View in master branch output = self.app.get('/test/blame/sources') self.assertEqual(output.status_code, 200) self.assertIn(b'', output.data) @@ -2090,6 +2095,21 @@ class PagureFlaskRepotests(tests.Modeltests): b'data-line-number="1">', output.data) self.assertIn( b'', output.data) + data = regex.findall(output.data) + self.assertEqual(len(data), 2) + + # View in feature branch + output = self.app.get('/test/blame/sources?identifier=feature') + self.assertEqual(output.status_code, 200) + self.assertIn(b'
 bar
', output.data) + self.assertIn( + b'', output.data) + self.assertIn( + b'', output.data) + data2 = regex.findall(output.data) + self.assertEqual(len(data2), 2) + self.assertNotEqual(data, data2) # View what's supposed to be an image output = self.app.get('/test/blame/test.jpg')
 bar