You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
552 B
32 lines
552 B
package accessctl
|
|
|
|
import "testing"
|
|
|
|
func TestFilterNot(t *testing.T) {
|
|
runCommitMatchTests(t, []filterCommitMatchTest{
|
|
{
|
|
descr: "sub-filter does match",
|
|
filter: FilterNot{
|
|
Filter: Filter{
|
|
CommitType: &FilterCommitType{Type: "foo"},
|
|
},
|
|
},
|
|
req: CommitRequest{
|
|
Type: "foo",
|
|
},
|
|
match: false,
|
|
},
|
|
{
|
|
descr: "sub-filter does not match",
|
|
filter: FilterNot{
|
|
Filter: Filter{
|
|
CommitType: &FilterCommitType{Type: "foo"},
|
|
},
|
|
},
|
|
req: CommitRequest{
|
|
Type: "bar",
|
|
},
|
|
match: true,
|
|
},
|
|
})
|
|
}
|
|
|