Updated test to not use packas as external lib

This commit is contained in:
Chris Joyce 2023-05-25 19:01:58 +10:00
parent 108aac8b0e
commit 552a24ed32

View File

@ -1,12 +1,10 @@
// Copyright 2020-21 PJ Engineering and Business Solutions Pty. Ltd. All rights reserved. // Copyright 2020-21 PJ Engineering and Business Solutions Pty. Ltd. All rights reserved.
package googlesearch_test package googlesearch
import ( import (
"context" "context"
"testing" "testing"
googlesearch "github.com/chrisjoyce911/google-search"
) )
var ctx = context.Background() var ctx = context.Background()
@ -15,11 +13,11 @@ func TestSearch(t *testing.T) {
q := "Hello World" q := "Hello World"
opts := googlesearch.SearchOptions{ opts := SearchOptions{
Limit: 20, Limit: 20,
} }
returnLinks, err := googlesearch.Search(ctx, q, opts) returnLinks, err := Search(ctx, q, opts)
if err != nil { if err != nil {
t.Errorf("something went wrong: %v", err) t.Errorf("something went wrong: %v", err)
return return