summaryrefslogtreecommitdiff
path: root/spec/lib/google_api
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-09-22 18:09:54 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-09-22 18:09:54 +0000
commit3bb41f7bdd2a94887af92fc33e8afac1032f0fbc (patch)
treeb4feed3b050d8fc930dc4ea747409965a71d4952 /spec/lib/google_api
parenteb08c8e6f8a49d5a621be0301aad0b1b475eb739 (diff)
downloadgitlab-ce-3bb41f7bdd2a94887af92fc33e8afac1032f0fbc.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/google_api')
-rw-r--r--spec/lib/google_api/auth_spec.rb8
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