diff options
Diffstat (limited to 'spec/lib/google_api/auth_spec.rb')
-rw-r--r-- | spec/lib/google_api/auth_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/lib/google_api/auth_spec.rb b/spec/lib/google_api/auth_spec.rb index eeb99bfbb6c..92cb9e494ac 100644 --- a/spec/lib/google_api/auth_spec.rb +++ b/spec/lib/google_api/auth_spec.rb @@ -12,12 +12,12 @@ RSpec.describe GoogleApi::Auth do end describe '#authorize_url' do - subject { client.authorize_url } + subject { Addressable::URI.parse(client.authorize_url) } it 'returns authorize_url' do - is_expected.to start_with('https://accounts.google.com/o/oauth2') - is_expected.to include(URI.encode(redirect_uri, URI::PATTERN::RESERVED)) - is_expected.to include(URI.encode(redirect_to, URI::PATTERN::RESERVED)) + expect(subject.to_s).to start_with('https://accounts.google.com/o/oauth2') + expect(subject.query_values['state']).to eq(redirect_to) + expect(subject.query_values['redirect_uri']).to eq(redirect_uri) end end |