Skip to content

Commit

Permalink
Fixed tests for new auth header keys
Browse files Browse the repository at this point in the history
  • Loading branch information
mrz1836 committed May 11, 2022
1 parent 68f7ba9 commit fa28a48
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion transports/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type TransportType string
const BuxUserAgent = "BUX: go-client " + BuxClientVersion

// BuxClientVersion is the version of the client
const BuxClientVersion = "v0.1.13"
const BuxClientVersion = "v0.1.14"

const (
// BuxTransportHTTP uses the http transport for all bux server actions
Expand Down
12 changes: 6 additions & 6 deletions transports/graphql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func TestGetDestination(t *testing.T) {
assert.IsType(t, &bux.Destination{}, destination)
assert.Equal(t, "test-address", destination.Address)
assert.Len(t, graphqlClient.Request.Header, 1)
assert.Contains(t, graphqlClient.Request.Header, "Auth_xpub")
assert.Contains(t, graphqlClient.Request.Header, "Bux-Auth-Xpub")
})
}

Expand Down Expand Up @@ -243,9 +243,9 @@ func TestDraftToRecipients(t *testing.T) {

func checkAuthHeaders(t *testing.T, graphqlClient GraphQLMockClient) {
assert.Len(t, graphqlClient.Request.Header, 5)
assert.Contains(t, graphqlClient.Request.Header, "Auth_hash")
assert.Contains(t, graphqlClient.Request.Header, "Auth_nonce")
assert.Contains(t, graphqlClient.Request.Header, "Auth_signature")
assert.Contains(t, graphqlClient.Request.Header, "Auth_time")
assert.Contains(t, graphqlClient.Request.Header, "Auth_xpub")
assert.Contains(t, graphqlClient.Request.Header, "Bux-Auth-Hash")
assert.Contains(t, graphqlClient.Request.Header, "Bux-Auth-Nonce")
assert.Contains(t, graphqlClient.Request.Header, "Bux-Auth-Signature")
assert.Contains(t, graphqlClient.Request.Header, "Bux-Auth-Time")
assert.Contains(t, graphqlClient.Request.Header, "Bux-Auth-Xpub")
}

0 comments on commit fa28a48

Please sign in to comment.