From 075649572d4472b588a8484ce3d7c37df7621f85 Mon Sep 17 00:00:00 2001 From: Lauris BH Date: Wed, 23 Jan 2019 06:10:38 +0200 Subject: Add the ability to use multiple labels as filters(#5786) --- models/issue_test.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'models/issue_test.go') 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) -- cgit v1.2.3