diff options
Diffstat (limited to 'integrations/api_issue_label_test.go')
-rw-r--r-- | integrations/api_issue_label_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/integrations/api_issue_label_test.go b/integrations/api_issue_label_test.go index 195ec24ca8..1bfaa4303e 100644 --- a/integrations/api_issue_label_test.go +++ b/integrations/api_issue_label_test.go @@ -54,8 +54,9 @@ func TestAPIReplaceIssueLabels(t *testing.T) { resp := session.MakeRequest(t, req, http.StatusOK) var apiLabels []*api.Label DecodeJSON(t, resp, &apiLabels) - assert.Len(t, apiLabels, 1) - assert.EqualValues(t, label.ID, apiLabels[0].ID) + if assert.Len(t, apiLabels, 1) { + assert.EqualValues(t, label.ID, apiLabels[0].ID) + } models.AssertCount(t, &models.IssueLabel{IssueID: issue.ID}, 1) models.AssertExistsAndLoadBean(t, &models.IssueLabel{IssueID: issue.ID, LabelID: label.ID}) |