8000 fix: fix dormancy notifications by BrunoQuaresma · Pull Request #14029 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

fix: fix dormancy notifications #14029

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Jul 29, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension 10000

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Verify if body and title are not empty
  • Loading branch information
BrunoQuaresma committed Jul 29, 2024
commit ab344b38e9708750461090783e3a178d83a29788
6 changes: 4 additions & 2 deletions coderd/notifications/notifications_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -694,11 +694,13 @@ func TestNotifcationTemplatesBody(t *testing.T) {
Scan(&titleTmpl, &bodyTmpl)
require.NoError(t, err, "failed to query body template for template:", tc.id)

_, err = render.GoTemplate(titleTmpl, tc.payload, nil)
title, err := render.GoTemplate(titleTmpl, tc.payload, nil)
require.NoError(t, err, "failed to render notification title template")
require.NotEmpty(t, title, "title should not be empty")

_, err = render.GoTemplate(bodyTmpl, tc.payload, nil)
body, err := render.GoTemplate(bodyTmpl, tc.payload, nil)
require.NoError(t, err, "failed to render notification body template")
require.NotEmpty(t, body, "body should not be empty")
})
}
}
Expand Down
Loading
0