From 3c1099a9424499d99dfa3d59f8003414de41a93a Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Mar 26 2019 20:01:25 +0000 Subject: Verify that forking does not run hooks Signed-off-by: Patrick Uiterwijk --- diff --git a/tests/test_pagure_repospanner.py b/tests/test_pagure_repospanner.py index a98e136..bc43da9 100644 --- a/tests/test_pagure_repospanner.py +++ b/tests/test_pagure_repospanner.py @@ -316,6 +316,9 @@ class PagureRepoSpannerTestsNewRepoDefault(PagureRepoSpannerTests): output.get_data(as_text=True)) with tests.user_set(self.app.application, tests.FakeUser(username='pingou')): + # Verify that for forking, Git auth status is ignored (hooks should not be run) + self.set_auth_status(False) + data = { 'csrf_token': self.get_csrf(), } @@ -331,6 +334,7 @@ class PagureRepoSpannerTestsNewRepoDefault(PagureRepoSpannerTests): self.assertIn( 'Overview - project-1 - Pagure', output_text) self.assertIn('Added the README', output_text) + self.assertIn('/?next=http://localhost/fork/pingou/project-1', output_text) output = self.app.get('/fork/pingou/project-1/settings') self.assertIn(