mirror of
https://github.com/status-im/fathom.git
synced 2025-03-01 11:30:28 +00:00
16 lines
315 B
Go
16 lines
315 B
Go
package api
|
|
|
|
import (
|
|
"net/http"
|
|
"testing"
|
|
)
|
|
|
|
func TestShouldCollect(t *testing.T) {
|
|
r, _ := http.NewRequest("GET", "/", nil)
|
|
r.Header.Add("User-Agent", "Mozilla/1.0")
|
|
r.Header.Add("Referer", "http://usefathom.com/")
|
|
if v := ShouldCollect(r); v != true {
|
|
t.Errorf("Expected %#v, got %#v", true, false)
|
|
}
|
|
}
|