Add two quick Client construction tests.

develop
Icedream 2016-09-04 13:28:39 +02:00
parent 1d2adea2d6
commit b3ec22e7e5
Signed by: icedream
GPG Key ID: 1573F6D8EFE4D0CF
1 changed files with 20 additions and 0 deletions

20
client_test.go Normal file
View File

@ -0,0 +1,20 @@
package footballdata
import (
"net/http"
"testing"
"github.com/stretchr/testify/require"
)
func Test_Client_New(t *testing.T) {
client := NewClient(http.DefaultClient)
_, err := client.Competitions().Do()
require.Nil(t, err)
}
func Test_Client_GoNew(t *testing.T) {
client := new(Client)
_, err := client.Competitions().Do()
require.Nil(t, err)
}