Skip to content

Commit

Permalink
added NoAcceptHeader unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
k4lizen committed Oct 17, 2023
1 parent 693a39f commit e08409f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions colly_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,19 @@ var newCollectorTests = map[string]func(*testing.T){
},
}

func TestNoAcceptHeader(t *testing.T) {
ts := newTestServer()
defer ts.Close()

c := NewCollector()

c.OnRequest(func(r *Request) {
r.Headers.Del("Accept")
})

c.Visit(ts.URL)
}

func TestNewCollector(t *testing.T) {
t.Run("Functional Options", func(t *testing.T) {
for name, test := range newCollectorTests {
Expand Down

0 comments on commit e08409f

Please sign in to comment.