Fix Matrix and MSTeams nil dereference (#28089)

Fixes #28088 
Fixes #28094

Added missing tests.

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
KN4CK3R 2023-11-17 12:17:33 +01:00 committed by GitHub
parent 17d246cdcc
commit 58f5fa6536
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 155 additions and 6 deletions

View file

@ -115,6 +115,15 @@ func TestPackagistPayload(t *testing.T) {
require.Nil(t, pl)
})
t.Run("Package", func(t *testing.T) {
p := packageTestPayload()
d := new(PackagistPayload)
pl, err := d.Package(p)
require.NoError(t, err)
require.Nil(t, pl)
})
t.Run("Wiki", func(t *testing.T) {
p := wikiTestPayload()