@@ -41,13 +41,13 @@ func TestSendNotificationWithBuildId(test *testing.T) {
4141 requestUrl = request .Host + request .URL .Path
4242 headers = request .Header
4343
44- fmt .Fprintln (writer , `{"project_slug":"gh/devatherock/email-sender","pipeline_number":292,"status":"running"}` )
44+ fmt .Fprintln (writer , `{"name":"publish"," project_slug":"gh/devatherock/email-sender","pipeline_number":292,"status":"running"}` )
4545 } else if requestIndex == 1 {
46- fmt .Fprintln (writer , `{"project_slug":"gh/devatherock/email-sender","pipeline_number":292,"status":"success"}` )
46+ fmt .Fprintln (writer , `{"name":"publish"," project_slug":"gh/devatherock/email-sender","pipeline_number":292,"status":"success"}` )
4747 } else if requestIndex == 4 {
48- fmt .Fprintln (writer , `{"project_slug":"gh/devatherock/email-sender","pipeline_number":292,"status":"failed"}` )
48+ fmt .Fprintln (writer , `{"name":"publish"," project_slug":"gh/devatherock/email-sender","pipeline_number":292,"status":"failed"}` )
4949 } else if requestIndex == 7 {
50- fmt .Fprintln (writer , `{"project_slug":"gh/devatherock/email-sender","pipeline_number":292,"status":"failing"}` )
50+ fmt .Fprintln (writer , `{"name":"publish"," project_slug":"gh/devatherock/email-sender","pipeline_number":292,"status":"failing"}` )
5151 } else { // 2, 5, 8 For the slack send call
5252 fmt .Fprintln (writer , `{"success":true}` )
5353 }
@@ -116,7 +116,7 @@ func TestSendNotificationWithBuildId(test *testing.T) {
116116
117117 // Verify slack request
118118 helper .VerifySlackRequest (test , capturedRequest , map [string ]string {
119- "text" : fmt .Sprintf ("%s: <https://app.circleci.com/pipelines/gh/devatherock/email-sender/292|gh/devatherock/email-sender-292>" , data .expectedStatus ),
119+ "text" : fmt .Sprintf ("%s: <https://app.circleci.com/pipelines/gh/devatherock/email-sender/292|gh/devatherock/email-sender-292>(publish) " , data .expectedStatus ),
120120 "color" : data .expectedColor ,
121121 "title" : "Build completed" ,
122122 })
0 commit comments