Commit 43e88de5 authored by Michal Čihař's avatar Michal Čihař

Test for update of disabled existing github repo

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 6a45b40d
......@@ -337,6 +337,20 @@ class HooksViewTest(ViewTestCase):
)
self.assertContains(response, 'Update triggered')
@OverrideSettings(ENABLE_HOOKS=True)
@OverrideSettings(BACKGROUND_HOOKS=False)
def test_view_hook_github_disabled(self):
# Adjust matching repo
self.subproject.repo = 'git://github.com/defunkt/github.git'
self.subproject.save()
self.project.enable_hooks = False
self.project.save()
response = self.client.post(
reverse('hook-github'),
{'payload': GITHUB_PAYLOAD}
)
self.assertContains(response, 'No matching repositories found!')
@OverrideSettings(ENABLE_HOOKS=True)
@OverrideSettings(BACKGROUND_HOOKS=False)
def test_view_hook_github(self):
......
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