@@ -72,14 +72,16 @@ func TestComposeIssueCommentMessage(t *testing.T) {
7272 gomailMsg := msgs [0 ].ToMessage ()
7373 mailto := gomailMsg .GetHeader ("To" )
7474 subject := gomailMsg .GetHeader ("Subject" )
75- inreplyTo := gomailMsg .GetHeader ("In-Reply-To" )
75+ messageID := gomailMsg .GetHeader ("Message-ID" )
76+ inReplyTo := gomailMsg .GetHeader ("In-Reply-To" )
7677 references := gomailMsg .GetHeader ("References" )
7778
7879 assert .Len (t , mailto , 1 , "exactly one recipient is expected in the To field" )
7980 assert .Equal (t , "Re: " , subject [0 ][:4 ], "Comment reply subject should contain Re:" )
8081 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" )
8385}
8486
8587func TestComposeIssueMessage (t * testing.T ) {
@@ -99,12 +101,14 @@ func TestComposeIssueMessage(t *testing.T) {
99101 mailto := gomailMsg .GetHeader ("To" )
100102 subject := gomailMsg .GetHeader ("Subject" )
101103 messageID := gomailMsg .GetHeader ("Message-ID" )
104+ inReplyTo := gomailMsg .GetHeader ("In-Reply-To" )
105+ references := gomailMsg .GetHeader ("References" )
102106
103107 assert .Len (t , mailto , 1 , "exactly one recipient is expected in the To field" )
104108 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" )
108112}
109113
110114func TestTemplateSelection (t * testing.T ) {
0 commit comments