dorkgen/dorkgen_test.go

25 lines
588 B
Go
Raw Normal View History

package dorkgen
import (
assertion "github.com/stretchr/testify/assert"
2020-09-05 18:56:14 +00:00
"github.com/sundowndev/dorkgen/duckduckgo"
"github.com/sundowndev/dorkgen/googlesearch"
"testing"
)
func TestInit(t *testing.T) {
assert := assertion.New(t)
t.Run("should create a GoogleSearch instance", func(t *testing.T) {
dork := NewGoogleSearch()
assert.IsType(&googlesearch.GoogleSearch{}, dork, "they should be equal")
})
2020-09-05 18:56:14 +00:00
t.Run("should create a DuckDuckGo instance", func(t *testing.T) {
dork := NewDuckDuckGo()
assert.IsType(&duckduckgo.DuckDuckGo{}, dork, "they should be equal")
})
}