aboutsummaryrefslogtreecommitdiffstats
path: root/models/issue_label_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/issue_label_test.go')
-rw-r--r--models/issue_label_test.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/models/issue_label_test.go b/models/issue_label_test.go
index 887f7f1425..68281dd7ad 100644
--- a/models/issue_label_test.go
+++ b/models/issue_label_test.go
@@ -38,11 +38,15 @@ func TestNewLabels(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
labels := []*Label{
{RepoID: 2, Name: "labelName2", Color: "#123456"},
- {RepoID: 3, Name: "labelName3", Color: "#23456F"},
+ {RepoID: 3, Name: "labelName3", Color: "#123"},
+ {RepoID: 4, Name: "labelName4", Color: "ABCDEF"},
+ {RepoID: 5, Name: "labelName5", Color: "DEF"},
}
assert.Error(t, NewLabel(&Label{RepoID: 3, Name: "invalid Color", Color: ""}))
- assert.Error(t, NewLabel(&Label{RepoID: 3, Name: "invalid Color", Color: "123456"}))
+ assert.Error(t, NewLabel(&Label{RepoID: 3, Name: "invalid Color", Color: "#45G"}))
assert.Error(t, NewLabel(&Label{RepoID: 3, Name: "invalid Color", Color: "#12345G"}))
+ assert.Error(t, NewLabel(&Label{RepoID: 3, Name: "invalid Color", Color: "45G"}))
+ assert.Error(t, NewLabel(&Label{RepoID: 3, Name: "invalid Color", Color: "12345G"}))
for _, label := range labels {
unittest.AssertNotExistsBean(t, label)
}