Skip to content

Commit 9f994f7

Browse files
committed
more tests
1 parent 2d24da0 commit 9f994f7

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

internal/cmd/match_criteria_test.go

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,36 @@ func TestLabelsMatch(t *testing.T) {
6868
selectLabels: []string{},
6969
want: true,
7070
},
71+
{
72+
prLabels: []string{"a"},
73+
selectLabels: []string{"a"},
74+
ignoreLabels: []string{"b"},
75+
want: true,
76+
},
77+
{
78+
prLabels: []string{"a"},
79+
selectLabels: []string{"a"},
80+
ignoreLabels: []string{"a"},
81+
want: false,
82+
},
83+
{
84+
prLabels: []string{"a"},
85+
selectLabels: []string{},
86+
ignoreLabels: []string{},
87+
want: true,
88+
},
89+
{
90+
prLabels: []string{"a"},
91+
selectLabels: []string{"a"},
92+
ignoreLabels: []string{},
93+
want: true,
94+
},
95+
{
96+
prLabels: []string{"a", "b", "c"},
97+
selectLabels: []string{"a", "b"},
98+
ignoreLabels: []string{"c"},
99+
want: false,
100+
},
71101
}
72102

73103
for _, test := range tests {

0 commit comments

Comments
 (0)