Skip to content

Commit

Permalink
attr for grant type, and test
Browse files Browse the repository at this point in the history
  • Loading branch information
SerKnight committed Jul 2, 2021
1 parent 1db3ce1 commit 2c808c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/xero-ruby/api_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ApiClient
# Defines the headers to be used in HTTP requests of all API calls by default.
#
# @return [Hash]
attr_accessor :default_headers
attr_accessor :default_headers, :grant_type

# Initializes the ApiClient
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
Expand Down
5 changes: 2 additions & 3 deletions spec/api_client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@
client_secret: '123',
}
api_client = XeroRuby::ApiClient.new(credentials: creds)
puts api_client.inspect
expect(api_client.grant_type).to eq('authoizaraion_code')
expect(api_client.grant_type).to eq('authorization_code')
end
end

Expand All @@ -93,7 +92,7 @@
grant_type: 'client_credentials'
}
api_client = XeroRuby::ApiClient.new(credentials: creds)
expect(api_client.grant_type).to eq('client_credentialsz')
expect(api_client.grant_type).to eq('client_credentials')
end

end
Expand Down

0 comments on commit 2c808c8

Please sign in to comment.