Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

github tests: Add test_ignored_events.

Steve Howell4c2787c35f57
diff --git a/zerver/webhooks/github/tests.py b/zerver/webhooks/github/tests.py
index f57b6974666..7950151179f 100644
--- a/zerver/webhooks/github/tests.py
+++ b/zerver/webhooks/github/tests.py
@@ -390,3 +390,21 @@ A temporary team so that I can get some webhook fixtures!
self.url = self.build_webhook_url()
payload = self.get_body('repository_vulnerability_alert')
self.verify_post_is_ignored(payload, "repository_vulnerability_alert")
+
+ def test_ignored_events(self) -> None:
+ # The payload for these events never gets looked at in the
+ # webhook itself; it only needs to be valid JSON.
+ payload = "{}"
+
+ ignored_events = [
+ "check_suite",
+ "label",
+ "meta",
+ "milestone",
+ "organization",
+ "project_card",
+ "repository_vulnerability_alert",
+ ]
+
+ for event in ignored_events:
+ self.verify_post_is_ignored(payload, event)