aboutsummaryrefslogtreecommitdiffstats
path: root/models/webhook_test.go
diff options
context:
space:
mode:
authortechknowlogick <matti@mdranta.net>2019-04-18 22:45:02 -0400
committerGitHub <noreply@github.com>2019-04-18 22:45:02 -0400
commit56da256853001cf3538b8d4ae99798e084935a90 (patch)
treecdbd686d31750aa89365635eb96705c5a9fc1efc /models/webhook_test.go
parent6dbd26185203d464c4a4e32e7af04a34f37ae4f2 (diff)
downloadgitea-56da256853001cf3538b8d4ae99798e084935a90.tar.gz
gitea-56da256853001cf3538b8d4ae99798e084935a90.zip
Telegram webhook (#4227)
Diffstat (limited to 'models/webhook_test.go')
-rw-r--r--models/webhook_test.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/models/webhook_test.go b/models/webhook_test.go
index 50106a3792..518be8be8a 100644
--- a/models/webhook_test.go
+++ b/models/webhook_test.go
@@ -197,18 +197,21 @@ func TestToHookTaskType(t *testing.T) {
assert.Equal(t, GOGS, ToHookTaskType("gogs"))
assert.Equal(t, SLACK, ToHookTaskType("slack"))
assert.Equal(t, GITEA, ToHookTaskType("gitea"))
+ assert.Equal(t, TELEGRAM, ToHookTaskType("telegram"))
}
func TestHookTaskType_Name(t *testing.T) {
assert.Equal(t, "gogs", GOGS.Name())
assert.Equal(t, "slack", SLACK.Name())
assert.Equal(t, "gitea", GITEA.Name())
+ assert.Equal(t, "telegram", TELEGRAM.Name())
}
func TestIsValidHookTaskType(t *testing.T) {
assert.True(t, IsValidHookTaskType("gogs"))
assert.True(t, IsValidHookTaskType("slack"))
assert.True(t, IsValidHookTaskType("gitea"))
+ assert.True(t, IsValidHookTaskType("telegram"))
assert.False(t, IsValidHookTaskType("invalid"))
}