Skip to content

Commit ccf7056

Browse files
committed
update tests to match expected value
when multiple labels selected, only issues with all the selected labels will be shown
1 parent 5d80044 commit ccf7056

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

models/fixtures/issue_label.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,8 @@
1212
id: 3
1313
issue_id: 2
1414
label_id: 1
15+
16+
-
17+
id: 4
18+
issue_id: 1
19+
label_id: 2

models/issue_test.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,13 +191,21 @@ func TestIssues(t *testing.T) {
191191
},
192192
[]int64{1, 2, 3, 5},
193193
},
194+
{
195+
IssuesOptions{
196+
Labels: "1",
197+
Page: 1,
198+
PageSize: 4,
199+
},
200+
[]int64{2, 1},
201+
},
194202
{
195203
IssuesOptions{
196204
Labels: "1,2",
197205
Page: 1,
198206
PageSize: 4,
199207
},
200-
[]int64{5, 2, 1},
208+
[]int64{1},
201209
},
202210
} {
203211
issues, err := Issues(&test.Opts)

0 commit comments

Comments
 (0)