Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package client

const SDK_VERSION = "1.8.1"
const SDK_VERSION = "1.9.0"
32 changes: 17 additions & 15 deletions test/oauth_sdk_api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ func TestOauthCheckoutSdks(t *testing.T) {
WithEnvironment(configuration.Sandbox()).
Build()

var oauthApiSubdomain, _ = checkout.Builder().
OAuth().
WithClientCredentials(
os.Getenv("CHECKOUT_DEFAULT_OAUTH_CLIENT_ID"),
os.Getenv("CHECKOUT_DEFAULT_OAUTH_CLIENT_SECRET")).
WithEnvironment(configuration.Sandbox()).
WithEnvironmentSubdomain("123dmain").
Build()
// Not ready yet to tests with subdomains
// var oauthApiSubdomain, _ = checkout.Builder().
// OAuth().
// WithClientCredentials(
// os.Getenv("CHECKOUT_DEFAULT_OAUTH_CLIENT_ID"),
// os.Getenv("CHECKOUT_DEFAULT_OAUTH_CLIENT_SECRET")).
// WithEnvironment(configuration.Sandbox()).
// WithEnvironmentSubdomain("123dmain").
// Build()

var oauthApiBad, _ = checkout.Builder().
OAuth().
Expand All @@ -49,13 +50,14 @@ func TestOauthCheckoutSdks(t *testing.T) {
assert.NotNil(t, oauthApi)
},
},
{
name: "should create a oauth checkout sdk api object with valid subdomain",
oauthApi: oauthApiSubdomain,
checker: func(token *nas.Api, err error) {
assert.NotNil(t, oauthApiSubdomain)
},
},
// Not ready yet to tests with subdomains
// {
// name: "should create a oauth checkout sdk api object with valid subdomain",
// oauthApi: oauthApiSubdomain,
// checker: func(token *nas.Api, err error) {
// assert.NotNil(t, oauthApiSubdomain)
// },
// },
{
name: "should fail a oauth checkout sdk api object",
oauthApi: oauthApiBad,
Expand Down