Files
nabarr/util/slice_test.go
l3uddz a2848439b9 pvr: add options and support for anime (#17)
* pvr: begin adding options

* pvr: add ability to configure add behaviour via config

* pvr: add skip_anime

* pvr: do not continue processing item if lookup failed or add to pvr failed
2021-02-20 20:01:04 +00:00

40 lines
677 B
Go

package util
import "testing"
func TestStringSliceContains(t *testing.T) {
type args struct {
slice []string
val string
}
tests := []struct {
name string
args args
want bool
}{
{
name: "expect true",
args: args{
slice: []string{"tes", "Test"},
val: "test",
},
want: true,
},
{
name: "expect false",
args: args{
slice: []string{"tes", "Test"},
val: "testing",
},
want: false,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := StringSliceContains(tt.args.slice, tt.args.val); got != tt.want {
t.Errorf("StringSliceContains() = %v, want %v", got, tt.want)
}
})
}
}