diff options
author | Matija Čupić <matteeyah@gmail.com> | 2017-12-04 01:59:29 +0100 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2017-12-04 01:59:29 +0100 |
commit | 04c6d102616b48c95b09656efc720c7dfdc99d8a (patch) | |
tree | f1d00c50ada38750cdeee719ca22697406d7b240 /spec/lib/google_api | |
parent | 50c8bd6350ebfd8d35deb2a1b41eb36e193d1a14 (diff) | |
download | gitlab-ce-04c6d102616b48c95b09656efc720c7dfdc99d8a.tar.gz |
Use RequestOptions in GCP Client user_agent_header
Diffstat (limited to 'spec/lib/google_api')
-rw-r--r-- | spec/lib/google_api/cloud_platform/client_spec.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/lib/google_api/cloud_platform/client_spec.rb b/spec/lib/google_api/cloud_platform/client_spec.rb index 41964034062..ee8f7afc285 100644 --- a/spec/lib/google_api/cloud_platform/client_spec.rb +++ b/spec/lib/google_api/cloud_platform/client_spec.rb @@ -129,9 +129,14 @@ describe GoogleApi::CloudPlatform::Client do describe '#user_agent_header' do subject { client.instance_eval { user_agent_header } } - it 'returns the correct major and minor GitLab version ' do + it 'returns a RequestOptions object' do + expect(subject).to be_instance_of(Google::Apis::RequestOptions) + end + + it 'has the correct GitLab version in User-Agent header' do stub_const('Gitlab::VERSION', '10.3.0-pre') - expect(subject).to eq({ 'User-Agent': 'GitLab/10.3 (GPN:GitLab;)' }) + + expect(subject.header).to eq({ 'User-Agent': 'GitLab/10.3 (GPN:GitLab;)' }) end end end |