Skip to content

Commit

Permalink
Updating tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Ettlin committed Mar 29, 2018
1 parent 64251c8 commit cd6befc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion synq/api2.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func NewV2(token string, timeouts ...time.Duration) ApiV2 {
}

func (a *ApiV2) handleAuth(req *http.Request) {
if strings.HasPrefix("Bearer ") {
if strings.HasPrefix(a.GetKey(), "Bearer ") {
req.Header.Add("Authorization", a.GetKey())
} else {
req.Header.Add("Authorization", "Bearer "+a.GetKey())
Expand Down
2 changes: 1 addition & 1 deletion synq/api2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func TestParseErrorV2(t *testing.T) {

func TestUpdateAssetMetadata(t *testing.T) {
assert := require.New(t)
api := setupTestApiV2(testAuth)
api := setupTestApiV2("Bearer " + testAuth)
metadata := json.RawMessage("{\"test\": true}")
asset, err := api.UpdateAssetMetadata(testAssetId, metadata)
assert.Nil(err)
Expand Down

0 comments on commit cd6befc

Please sign in to comment.