diff --git a/tests/test_pagure_flask_ui_issues.py b/tests/test_pagure_flask_ui_issues.py index f96c0ff..f0aaef8 100644 --- a/tests/test_pagure_flask_ui_issues.py +++ b/tests/test_pagure_flask_ui_issues.py @@ -1682,6 +1682,37 @@ class PagureFlaskIssuestests(tests.Modeltests): self.assertEqual(issue.comments[0].comment, 'Second update') + @patch('pagure.lib.git.update_git') + @patch('pagure.lib.notify.send_email') + def test_git_urls(self, p_send_email, p_ugt): + """ Check that the url to the git repo for issues is present/absent when + it should. + """ + p_send_email.return_value = True + p_ugt.return_value = True + + self.test_view_issues() + + user = tests.FakeUser() + user.username = 'pingou' + with tests.user_set(pagure.APP, user): + # Check that the git issue URL is present + output = self.app.get('/test') + self.assertNotIn( + '