integrations: Add force push fixtures for GitHub Integration.

One fixture is just removing commits; the other removes some commits
but adds others.
This commit is contained in:
sbansal1999
2023-05-04 20:42:59 +05:30
committed by Tim Abbott
parent 715fa3aff6
commit dba6f84b97
3 changed files with 368 additions and 0 deletions

View File

@@ -37,6 +37,14 @@ class GitHubWebhookTest(WebhookTestCase):
expected_message = "eeshangarg [deleted](https://github.com/eeshangarg/public-repo/compare/2e8cf535fb38...000000000000) the branch feature."
self.check_webhook("push__delete_branch", "public-repo / feature", expected_message)
def test_push_force_1_commit(self) -> None:
expected_message = "sbansal1999 [pushed](https://github.com/sbansal1999/zulip/compare/b6de8891fc10...971d76ca3094) 1 commit to branch temp.\n\n* log: Add important.txt which is useful for logging errors. ([971d76ca309](https://github.com/sbansal1999/zulip/commit/971d76ca309446a9c20381f6271cea8a59b4e40a))"
self.check_webhook("push__force_1_commit", "zulip / temp", expected_message)
def test_push__force_remove_commits(self) -> None:
expected_message = "sbansal1999 [pushed](https://github.com/sbansal1999/zulip/compare/2084a91af9ca...9a8749ea8fe7) the branch temp."
self.check_webhook("push__force_remove_commits", "zulip / temp", expected_message)
def test_push_local_branch_without_commits(self) -> None:
expected_message = "eeshangarg [pushed](https://github.com/eeshangarg/public-repo/compare/feature) the branch feature."
self.check_webhook(