INNER CODE UNIT · Go
TestNewClient_CreatesClientWithCorrectConfigGiven
samsara/samsara · clients/go/client_test.go:41
func TestNewClient_CreatesClientWithCorrectConfigGiven(t *testing.T) {
config := NewConfig()
config.Url = "http://test.com"
client, err := NewClient(config)
if err != nil {
t.Errorf("Client init with correct config should not return error. Got %+v", err)
}
if client == nil {
t.Error("Client should have been created")
}
}
func TestNewClient_CreatesClientWithFieldsProperlySet(t *testing.T) {
config := NewConfig()
config.Url = "http://test.com"
config.MaxBufferSize = 555