Skip to content

Commit

Permalink
fix specs name
Browse files Browse the repository at this point in the history
  • Loading branch information
SerKnight committed Jul 2, 2021
1 parent 2c808c8 commit ee147d1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions spec/api_client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,20 @@
altered_state = {'state': 'not-original-state'}
expect{api_client.validate_state(altered_state)}.to raise_error(StandardError, 'WARNING: @config.state: custom-state and OAuth callback state: do not match!')
end
end

context "Creates a valid client_credentials client" do

it "defaults to grant_type: authoriation_code" do
it "But still defaults to grant_type: authorization_code" do
creds = {
client_id: 'abc',
client_secret: '123',
}
api_client = XeroRuby::ApiClient.new(credentials: creds)
expect(api_client.grant_type).to eq('authorization_code')
end
end

context "creates a valid authorization_code client" do
it "passes through attributes" do
it "Sets grant_type correctly" do
creds = {
client_id: 'abc',
client_secret: '123',
Expand Down

0 comments on commit ee147d1

Please sign in to comment.