* 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
40 lines
677 B
Go
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)
|
|
}
|
|
})
|
|
}
|
|
}
|