@@ -166,6 +166,7 @@ func Test_getIssueFromRef(t *testing.T) {
166
166
{"reopen #2" , 2 },
167
167
{"user2/repo2#1" , 4 },
168
168
{"fixes user2/repo2#1" , 4 },
169
+ {"fixes: user2/repo2#1" , 4 },
169
170
} {
170
171
issue , err := getIssueFromRef (repo , test .Ref )
171
172
assert .NoError (t , err )
@@ -260,6 +261,31 @@ func TestUpdateIssuesCommit(t *testing.T) {
260
261
CheckConsistencyFor (t , & Action {})
261
262
}
262
263
264
+ func TestUpdateIssuesCommit_Colon (t * testing.T ) {
265
+ assert .NoError (t , PrepareTestDatabase ())
266
+ pushCommits := []* PushCommit {
267
+ {
268
+ Sha1 : "abcdef2" ,
269
+ CommitterEmail :
"[email protected] " ,
270
+ CommitterName : "User Two" ,
271
+
272
+ AuthorName : "User Two" ,
273
+ Message : "close: #2" ,
274
+ },
275
+ }
276
+
277
+ user := AssertExistsAndLoadBean (t , & User {ID : 2 }).(* User )
278
+ repo := AssertExistsAndLoadBean (t , & Repository {ID : 1 }).(* Repository )
279
+ repo .Owner = user
280
+
281
+ issueBean := & Issue {RepoID : repo .ID , Index : 2 }
282
+
283
+ AssertNotExistsBean (t , & Issue {RepoID : repo .ID , Index : 2 }, "is_closed=1" )
284
+ assert .NoError (t , UpdateIssuesCommit (user , repo , pushCommits , repo .DefaultBranch ))
285
+ AssertExistsAndLoadBean (t , issueBean , "is_closed=1" )
286
+ CheckConsistencyFor (t , & Action {})
287
+ }
288
+
263
289
func TestUpdateIssuesCommit_Issue5957 (t * testing.T ) {
264
290
assert .NoError (t , PrepareTestDatabase ())
265
291
user := AssertExistsAndLoadBean (t , & User {ID : 2 }).(* User )
0 commit comments