Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf47063b

Browse files
committed
feat(notifications): adapt tests with new labels
1 parent4e46638 commitf47063b

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

‎coderd/notifications/notifications_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,9 @@ func TestWebhookDispatch(t *testing.T) {
239239

240240
// WHEN: a notification is enqueued (including arbitrary labels)
241241
input:=map[string]string{
242-
"a":"b",
243-
"c":"d",
242+
"a":"b",
243+
"c":"d",
244+
"_logo_url":notifications.NotificationsDefaultLogoURL,
244245
}
245246
msgID,err:=enq.Enqueue(ctx,user.ID,notifications.TemplateWorkspaceDeleted,input,"test")
246247
require.NoError(t,err)

‎coderd/notifications/notifier.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
)
2626

2727
const (
28-
notificationsDefaultLogoURL="https://coder.com/coder-logo-horizontal.png"
28+
NotificationsDefaultLogoURL="https://coder.com/coder-logo-horizontal.png"
2929
)
3030

3131
// notifier is a consumer of the notifications_messages queue. It dequeues messages from that table and processes them
@@ -236,7 +236,7 @@ func (n *notifier) prepare(ctx context.Context, msg database.AcquireNotification
236236

237237
iflogoURL=="" {
238238
//nolint:ineffassign // define to default value if unable to fetch one from db
239-
logoURL=notificationsDefaultLogoURL
239+
logoURL=NotificationsDefaultLogoURL
240240
}
241241

242242
payload.Labels["_logo_url"]=logoURL

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp