diff options
author | Lauris BH <lauris@nix.lv> | 2019-01-23 06:10:38 +0200 |
---|---|---|
committer | techknowlogick <matti@mdranta.net> | 2019-01-22 23:10:38 -0500 |
commit | 075649572d4472b588a8484ce3d7c37df7621f85 (patch) | |
tree | 5658dfda46b32c0686895615bceffbdac01ef4a3 /models/issue_test.go | |
parent | 6a949af8ca3aaa30f917c8ed792ae88bbaafdd75 (diff) | |
download | gitea-075649572d4472b588a8484ce3d7c37df7621f85.tar.gz gitea-075649572d4472b588a8484ce3d7c37df7621f85.zip |
Add the ability to use multiple labels as filters(#5786)
Diffstat (limited to 'models/issue_test.go')
-rw-r--r-- | models/issue_test.go | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/models/issue_test.go b/models/issue_test.go index d98debb178..3bda3304c3 100644 --- a/models/issue_test.go +++ b/models/issue_test.go @@ -193,11 +193,19 @@ func TestIssues(t *testing.T) { }, { IssuesOptions{ - Labels: "1,2", + LabelIDs: []int64{1}, Page: 1, PageSize: 4, }, - []int64{5, 2, 1}, + []int64{2, 1}, + }, + { + IssuesOptions{ + LabelIDs: []int64{1, 2}, + Page: 1, + PageSize: 4, + }, + []int64{}, // issues with **both** label 1 and 2, none of these issues matches, TODO: add more tests }, } { issues, err := Issues(&test.Opts) |