mirror of
https://github.com/go-gitea/gitea.git
synced 2025-10-06 00:36:28 +00:00
Backport #28089 by @KN4CK3R Fixes #28088 Fixes #28094 Added missing tests. Co-authored-by: KN4CK3R <admin@oldschoolhack.me> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
@@ -144,6 +144,18 @@ func TestFeishuPayload(t *testing.T) {
|
||||
assert.Equal(t, "[test/repo] Repository created", pl.(*FeishuPayload).Content.Text)
|
||||
})
|
||||
|
||||
t.Run("Package", func(t *testing.T) {
|
||||
p := packageTestPayload()
|
||||
|
||||
d := new(FeishuPayload)
|
||||
pl, err := d.Package(p)
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, pl)
|
||||
require.IsType(t, &FeishuPayload{}, pl)
|
||||
|
||||
assert.Equal(t, "Package created: GiteaContainer:latest by user1", pl.(*FeishuPayload).Content.Text)
|
||||
})
|
||||
|
||||
t.Run("Wiki", func(t *testing.T) {
|
||||
p := wikiTestPayload()
|
||||
|
||||
|
Reference in New Issue
Block a user