@@ -85,7 +85,7 @@ func TestComposeIssueCommentMessage(t *testing.T) {
8585
8686 recipients := []
* user_model.
User {{
Name :
"Test" ,
Email :
"[email protected] " }, {
Name :
"Test2" ,
Email :
"[email protected] " }}
8787 msgs , err := composeIssueCommentMessages (& mailCommentContext {
88- Context : context .TODO (), // TODO: use a correct context
88+ Context : context .TODO (),
8989 Issue : issue , Doer : doer , ActionType : activities_model .ActionCommentIssue ,
9090 Content : fmt .Sprintf ("test @%s %s#%d body" , doer .Name , issue .Repo .FullName (), issue .Index ),
9191 Comment : comment ,
@@ -131,7 +131,7 @@ func TestComposeIssueMessage(t *testing.T) {
131131
132132 recipients := []
* user_model.
User {{
Name :
"Test" ,
Email :
"[email protected] " }, {
Name :
"Test2" ,
Email :
"[email protected] " }}
133133 msgs , err := composeIssueCommentMessages (& mailCommentContext {
134- Context : context .TODO (), // TODO: use a correct context
134+ Context : context .TODO (),
135135 Issue : issue , Doer : doer , ActionType : activities_model .ActionCreateIssue ,
136136 Content : "test body" ,
137137 }, "en-US" , recipients , false , "issue create" )
@@ -178,14 +178,14 @@ func TestTemplateSelection(t *testing.T) {
178178 }
179179
180180 msg := testComposeIssueCommentMessage (t , & mailCommentContext {
181- Context : context .TODO (), // TODO: use a correct context
181+ Context : context .TODO (),
182182 Issue : issue , Doer : doer , ActionType : activities_model .ActionCreateIssue ,
183183 Content : "test body" ,
184184 }, recipients , false , "TestTemplateSelection" )
185185 expect (t , msg , "issue/new/subject" , "issue/new/body" )
186186
187187 msg = testComposeIssueCommentMessage (t , & mailCommentContext {
188- Context : context .TODO (), // TODO: use a correct context
188+ Context : context .TODO (),
189189 Issue : issue , Doer : doer , ActionType : activities_model .ActionCommentIssue ,
190190 Content : "test body" , Comment : comment ,
191191 }, recipients , false , "TestTemplateSelection" )
@@ -194,14 +194,14 @@ func TestTemplateSelection(t *testing.T) {
194194 pull := unittest .AssertExistsAndLoadBean (t , & issues_model.Issue {ID : 2 , Repo : repo , Poster : doer })
195195 comment = unittest .AssertExistsAndLoadBean (t , & issues_model.Comment {ID : 4 , Issue : pull })
196196 msg = testComposeIssueCommentMessage (t , & mailCommentContext {
197- Context : context .TODO (), // TODO: use a correct context
197+ Context : context .TODO (),
198198 Issue : pull , Doer : doer , ActionType : activities_model .ActionCommentPull ,
199199 Content : "test body" , Comment : comment ,
200200 }, recipients , false , "TestTemplateSelection" )
201201 expect (t , msg , "pull/comment/subject" , "pull/comment/body" )
202202
203203 msg = testComposeIssueCommentMessage (t , & mailCommentContext {
204- Context : context .TODO (), // TODO: use a correct context
204+ Context : context .TODO (),
205205 Issue : issue , Doer : doer , ActionType : activities_model .ActionCloseIssue ,
206206 Content : "test body" , Comment : comment ,
207207 }, recipients , false , "TestTemplateSelection" )
@@ -220,7 +220,7 @@ func TestTemplateServices(t *testing.T) {
220220
221221 recipients := []
* user_model.
User {{
Name :
"Test" ,
Email :
"[email protected] " }}
222222 msg := testComposeIssueCommentMessage (t , & mailCommentContext {
223- Context : context .TODO (), // TODO: use a correct context
223+ Context : context .TODO (),
224224 Issue : issue , Doer : doer , ActionType : actionType ,
225225 Content : "test body" , Comment : comment ,
226226 }, recipients , fromMention , "TestTemplateServices" )
@@ -263,7 +263,7 @@ func testComposeIssueCommentMessage(t *testing.T, ctx *mailCommentContext, recip
263263func TestGenerateAdditionalHeaders (t * testing.T ) {
264264 doer , _ , issue , _ := prepareMailerTest (t )
265265
266- ctx := & mailCommentContext {Context : context .TODO () /* TODO: use a correct context */ , Issue : issue , Doer : doer }
266+ ctx := & mailCommentContext {Context : context .TODO (), Issue : issue , Doer : doer }
267267 recipient := & user_model.
User {
Name :
"test" ,
Email :
"[email protected] " }
268268
269269 headers := generateAdditionalHeaders (ctx , "dummy-reason" , recipient )
0 commit comments