feat: notify users on template deprecation (#15195)

Closes https://github.com/coder/coder/issues/15117

Notify users when a template has been deprecated.
This commit is contained in:
Danielle Maywood
2024-10-24 13:12:12 +01:00
committed by GitHub
parent bcd68ee249
commit 095c9797c9
8 changed files with 255 additions and 2 deletions

View File

@ -1021,6 +1021,20 @@ func TestNotificationTemplates_Golden(t *testing.T) {
appName: "Custom Application Name",
logoURL: "https://custom.application/logo.png",
},
{
name: "TemplateTemplateDeprecated",
id: notifications.TemplateTemplateDeprecated,
payload: types.MessagePayload{
UserName: "Bobby",
UserEmail: "bobby@coder.com",
UserUsername: "bobby",
Labels: map[string]string{
"template": "alpha",
"message": "This template has been replaced by beta",
"organization": "coder",
},
},
},
}
// We must have a test case for every notification_template. This is enforced below: