Skip to content

Commit

Permalink
Test the new fields
Browse files Browse the repository at this point in the history
Signed-off-by: gotjosh <[email protected]>
  • Loading branch information
gotjosh committed Oct 24, 2024
1 parent 155e76e commit 6e1f76b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion notify/discord/discord_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ func TestDiscord_Notify(t *testing.T) {
Title: "Test Title",
Message: "Test Message",
Content: "Test Content",
Username: "Test Username",
AvatarURL: "http://example.com/avatar.png",
}

// Create a new Discord notifier
Expand All @@ -227,5 +229,5 @@ func TestDiscord_Notify(t *testing.T) {
require.NoError(t, err)
require.False(t, ok)

require.Equal(t, "{\"content\":\"Test Content\",\"embeds\":[{\"title\":\"Test Title\",\"description\":\"Test Message\",\"color\":10038562}]}\n", resp)
require.Equal(t, "{\"content\":\"Test Content\",\"embeds\":[{\"title\":\"Test Title\",\"description\":\"Test Message\",\"color\":10038562}],\"username\":\"Test Username\",\"avatar_url\":\"http://example.com/avatar.png\"}\n", resp)
}

0 comments on commit 6e1f76b

Please sign in to comment.