Add Co-authored-by trailers to Merge's squash commit
This commit is contained in:
@@ -291,7 +291,17 @@ func TestMergeTask(t *testing.T) {
|
||||
task := api.Task{}
|
||||
h.do("POST", "/api/projects/"+p.Id+"/tasks", api.TaskCreate{Title: "Add notes"}, &task)
|
||||
|
||||
code := h.do("POST", "/api/tasks/"+task.Id+"/merge", nil, nil)
|
||||
coAuthors := []api.Participant{}
|
||||
code := h.do("GET", "/api/tasks/"+task.Id+"/co-authors", nil, &coAuthors)
|
||||
if code != http.StatusOK || len(coAuthors) != 0 {
|
||||
t.Fatalf("co-authors: %d %+v", code, coAuthors)
|
||||
}
|
||||
code = h.do("GET", "/api/tasks/nope/co-authors", nil, nil)
|
||||
if code != http.StatusNotFound {
|
||||
t.Fatalf("want 404 for co-authors of an unknown task, got %d", code)
|
||||
}
|
||||
|
||||
code = h.do("POST", "/api/tasks/"+task.Id+"/merge", nil, nil)
|
||||
if code != http.StatusBadRequest {
|
||||
t.Fatalf("want 400 merging without a git identity, got %d", code)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user