@@ -83,7 +83,7 @@ func TestComposeIssueCommentMessage(t *testing.T) {
8383 bodyTemplates = template .Must (template .New ("issue/comment" ).Parse (bodyTpl ))
8484
8585 recipients := []
* user_model.
User {{
Name :
"Test" ,
Email :
"[email protected] " }, {
Name :
"Test2" ,
Email :
"[email protected] " }}
86- msgs , err := composeIssueCommentMessages (& mailCommentContext {
86+ msgs , err := composeIssueCommentMessages (& MailCommentContext {
8787 Context : context .TODO (), // TODO: use a correct context
8888 Issue : issue , Doer : doer , ActionType : activities_model .ActionCommentIssue ,
8989 Content : fmt .Sprintf ("test @%s %s#%d body" , doer .Name , issue .Repo .FullName (), issue .Index ),
@@ -129,7 +129,7 @@ func TestComposeIssueMessage(t *testing.T) {
129129 bodyTemplates = template .Must (template .New ("issue/new" ).Parse (bodyTpl ))
130130
131131 recipients := []
* user_model.
User {{
Name :
"Test" ,
Email :
"[email protected] " }, {
Name :
"Test2" ,
Email :
"[email protected] " }}
132- msgs , err := composeIssueCommentMessages (& mailCommentContext {
132+ msgs , err := composeIssueCommentMessages (& MailCommentContext {
133133 Context : context .TODO (), // TODO: use a correct context
134134 Issue : issue , Doer : doer , ActionType : activities_model .ActionCreateIssue ,
135135 Content : "test body" ,
@@ -176,14 +176,14 @@ func TestTemplateSelection(t *testing.T) {
176176 assert .Contains (t , wholemsg , expBody )
177177 }
178178
179- msg := testComposeIssueCommentMessage (t , & mailCommentContext {
179+ msg := testComposeIssueCommentMessage (t , & MailCommentContext {
180180 Context : context .TODO (), // TODO: use a correct context
181181 Issue : issue , Doer : doer , ActionType : activities_model .ActionCreateIssue ,
182182 Content : "test body" ,
183183 }, recipients , false , "TestTemplateSelection" )
184184 expect (t , msg , "issue/new/subject" , "issue/new/body" )
185185
186- msg = testComposeIssueCommentMessage (t , & mailCommentContext {
186+ msg = testComposeIssueCommentMessage (t , & MailCommentContext {
187187 Context : context .TODO (), // TODO: use a correct context
188188 Issue : issue , Doer : doer , ActionType : activities_model .ActionCommentIssue ,
189189 Content : "test body" , Comment : comment ,
@@ -192,14 +192,14 @@ func TestTemplateSelection(t *testing.T) {
192192
193193 pull := unittest .AssertExistsAndLoadBean (t , & issues_model.Issue {ID : 2 , Repo : repo , Poster : doer })
194194 comment = unittest .AssertExistsAndLoadBean (t , & issues_model.Comment {ID : 4 , Issue : pull })
195- msg = testComposeIssueCommentMessage (t , & mailCommentContext {
195+ msg = testComposeIssueCommentMessage (t , & MailCommentContext {
196196 Context : context .TODO (), // TODO: use a correct context
197197 Issue : pull , Doer : doer , ActionType : activities_model .ActionCommentPull ,
198198 Content : "test body" , Comment : comment ,
199199 }, recipients , false , "TestTemplateSelection" )
200200 expect (t , msg , "pull/comment/subject" , "pull/comment/body" )
201201
202- msg = testComposeIssueCommentMessage (t , & mailCommentContext {
202+ msg = testComposeIssueCommentMessage (t , & MailCommentContext {
203203 Context : context .TODO (), // TODO: use a correct context
204204 Issue : issue , Doer : doer , ActionType : activities_model .ActionCloseIssue ,
205205 Content : "test body" , Comment : comment ,
@@ -218,7 +218,7 @@ func TestTemplateServices(t *testing.T) {
218218 bodyTemplates = template .Must (template .New ("issue/default" ).Parse (tplBody ))
219219
220220 recipients := []
* user_model.
User {{
Name :
"Test" ,
Email :
"[email protected] " }}
221- msg := testComposeIssueCommentMessage (t , & mailCommentContext {
221+ msg := testComposeIssueCommentMessage (t , & MailCommentContext {
222222 Context : context .TODO (), // TODO: use a correct context
223223 Issue : issue , Doer : doer , ActionType : actionType ,
224224 Content : "test body" , Comment : comment ,
@@ -252,7 +252,7 @@ func TestTemplateServices(t *testing.T) {
252252 "//Re: //" )
253253}
254254
255- func testComposeIssueCommentMessage (t * testing.T , ctx * mailCommentContext , recipients []* user_model.User , fromMention bool , info string ) * Message {
255+ func testComposeIssueCommentMessage (t * testing.T , ctx * MailCommentContext , recipients []* user_model.User , fromMention bool , info string ) * Message {
256256 msgs , err := composeIssueCommentMessages (ctx , "en-US" , recipients , fromMention , info )
257257 assert .NoError (t , err )
258258 assert .Len (t , msgs , 1 )
@@ -262,7 +262,7 @@ func testComposeIssueCommentMessage(t *testing.T, ctx *mailCommentContext, recip
262262func TestGenerateAdditionalHeaders (t * testing.T ) {
263263 doer , _ , issue , _ := prepareMailerTest (t )
264264
265- ctx := & mailCommentContext {Context : context .TODO () /* TODO: use a correct context */ , Issue : issue , Doer : doer }
265+ ctx := & MailCommentContext {Context : context .TODO () /* TODO: use a correct context */ , Issue : issue , Doer : doer }
266266 recipient := & user_model.
User {
Name :
"test" ,
Email :
"[email protected] " }
267267
268268 headers := generateAdditionalHeaders (ctx , "dummy-reason" , recipient )
0 commit comments