@@ -72,14 +72,16 @@ func TestComposeIssueCommentMessage(t *testing.T) {
72
72
gomailMsg := msgs [0 ].ToMessage ()
73
73
mailto := gomailMsg .GetHeader ("To" )
74
74
subject := gomailMsg .GetHeader ("Subject" )
75
- inreplyTo := gomailMsg .GetHeader ("In-Reply-To" )
75
+ messageID := gomailMsg .GetHeader ("Message-ID" )
76
+ inReplyTo := gomailMsg .GetHeader ("In-Reply-To" )
76
77
references := gomailMsg .GetHeader ("References" )
77
78
78
79
assert .Len (t , mailto , 1 , "exactly one recipient is expected in the To field" )
79
80
assert .Equal (t , "Re: " , subject [0 ][:4 ], "Comment reply subject should contain Re:" )
80
81
assert .Equal (t , "Re: [user2/repo1] @user2 #1 - issue1" , subject [0 ])
81
- assert .Equal (t , inreplyTo [0 ], "<user2/repo1/issues/1@localhost>" , "In-Reply-To header doesn't match" )
82
- assert .Equal (t , references [0 ], "<user2/repo1/issues/1@localhost>" , "References header doesn't match" )
82
+ assert .Equal (t , "<user2/repo1/issues/1@localhost>" , inReplyTo [0 ], "In-Reply-To header doesn't match" )
83
+ assert .Equal (t , "<user2/repo1/issues/1@localhost>" , references [0 ], "References header doesn't match" )
84
+ assert .Equal (t , "<user2/repo1/issues/1/comment/2@localhost>" , messageID [0 ], "Message-ID header doesn't match" )
83
85
}
84
86
85
87
func TestComposeIssueMessage (t * testing.T ) {
@@ -99,12 +101,14 @@ func TestComposeIssueMessage(t *testing.T) {
99
101
mailto := gomailMsg .GetHeader ("To" )
100
102
subject := gomailMsg .GetHeader ("Subject" )
101
103
messageID := gomailMsg .GetHeader ("Message-ID" )
104
+ inReplyTo := gomailMsg .GetHeader ("In-Reply-To" )
105
+ references := gomailMsg .GetHeader ("References" )
102
106
103
107
assert .Len (t , mailto , 1 , "exactly one recipient is expected in the To field" )
104
108
assert .Equal (t , "[user2/repo1] @user2 #1 - issue1" , subject [0 ])
105
- assert .Nil (t , gomailMsg . GetHeader ( " In-Reply-To" ) )
106
- assert .Nil (t , gomailMsg . GetHeader ( " References" ) )
107
- assert .Equal (t , messageID [ 0 ], "<user2/repo1/issues/1@localhost>" , "Message-ID header doesn't match" )
109
+ assert .Equal (t , "<user2/repo1/issues/1@localhost>" , inReplyTo [ 0 ], " In-Reply-To header doesn't match" )
110
+ assert .Equal (t , "<user2/repo1/issues/1@localhost>" , references [ 0 ], " References header doesn't match" )
111
+ assert .Equal (t , "<user2/repo1/issues/1@localhost>" , messageID [ 0 ] , "Message-ID header doesn't match" )
108
112
}
109
113
110
114
func TestTemplateSelection (t * testing.T ) {
0 commit comments