TestPullRequestCommentEvent tests the new pull_request_comment event identifier
(t *testing.T)
| 15 | |
| 16 | // TestPullRequestCommentEvent tests the new pull_request_comment event identifier |
| 17 | func TestPullRequestCommentEvent(t *testing.T) { |
| 18 | // Test that pull_request_comment is recognized |
| 19 | mapping := GetCommentEventByIdentifier("pull_request_comment") |
| 20 | if mapping == nil { |
| 21 | t.Fatal("pull_request_comment should be a valid event identifier") |
| 22 | } |
| 23 | if mapping.EventName != "pull_request_comment" { |
| 24 | t.Errorf("Expected EventName to be 'pull_request_comment', got '%s'", mapping.EventName) |
| 25 | } |
| 26 | if !mapping.IsPRComment { |
| 27 | t.Error("Expected IsPRComment to be true for pull_request_comment") |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | // TestIssueCommentRestriction tests that issue_comment is restricted to issues only |
| 32 | func TestIssueCommentRestriction(t *testing.T) { |
nothing calls this directly
no test coverage detected