Fix filter tests (#368)
This commit is contained in:
parent
bc5e61ecc3
commit
4bea474ae6
@ -43,7 +43,7 @@ func TestLineFiltering(t *testing.T) {
|
||||
for i := int64(0); i < test.input; i++ {
|
||||
data = append(data, "A")
|
||||
}
|
||||
resp := ffuf.Response{Data: []byte(strings.Join(data, " "))}
|
||||
resp := ffuf.Response{Data: []byte(strings.Join(data, "\n"))}
|
||||
filterReturn, _ := f.Filter(&resp)
|
||||
if filterReturn != test.output {
|
||||
t.Errorf("Filter test %d: Was expecing filter return value of %t but got %t", i, test.output, filterReturn)
|
||||
|
||||
@ -35,7 +35,13 @@ func TestRegexpFiltering(t *testing.T) {
|
||||
{"s1arch", false},
|
||||
{"invalid", false},
|
||||
} {
|
||||
resp := ffuf.Response{Data: []byte(test.input)}
|
||||
inp := make(map[string][]byte)
|
||||
resp := ffuf.Response{
|
||||
Data: []byte(test.input),
|
||||
Request: &ffuf.Request{
|
||||
Input: inp,
|
||||
},
|
||||
}
|
||||
filterReturn, _ := f.Filter(&resp)
|
||||
if filterReturn != test.output {
|
||||
t.Errorf("Filter test %d: Was expecing filter return value of %t but got %t", i, test.output, filterReturn)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user