Bugfixes + ability to set values per query.

This commit is contained in:
2023-04-08 00:54:48 +01:00
parent 23f88a91d2
commit 689b1efc43
7 changed files with 119 additions and 13 deletions
+29 -1
View File
@@ -5,7 +5,6 @@ import (
"testing"
"github.com/lukaszraczylo/go-simple-graphql/utils/logger"
"github.com/stretchr/testify/assert"
)
@@ -101,3 +100,32 @@ func TestNewConnectionLogLevels(t *testing.T) {
})
}
}
func TestBaseClient_SetEndpoint(t *testing.T) {
type fields struct {
}
type args struct {
endpoint string
}
tests := []struct {
name string
fields fields
args args
want string
}{
{
name: "Test SetEndpoint",
args: args{
endpoint: "https://potato/graphql",
},
want: "https://potato/graphql",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
b := NewConnection()
b.SetEndpoint(tt.args.endpoint)
assert.Equal(t, tt.want, b.endpoint)
})
}
}