diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-01 12:08:00 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-01 12:08:00 +0000 |
commit | 1a0d6dbdc2ac3047f4953a359ef27ba6e26074ae (patch) | |
tree | ddb78a8a0d1350dc767f049a21e0f7d37edaa82c /spec/support/services | |
parent | b11f7057d067885619ee3e513751f180b2e8ad85 (diff) | |
download | gitlab-ce-1a0d6dbdc2ac3047f4953a359ef27ba6e26074ae.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/services')
-rw-r--r-- | spec/support/services/deploy_token_shared_examples.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/support/services/deploy_token_shared_examples.rb b/spec/support/services/deploy_token_shared_examples.rb index b49f4743f7d..70efd1fcd0c 100644 --- a/spec/support/services/deploy_token_shared_examples.rb +++ b/spec/support/services/deploy_token_shared_examples.rb @@ -17,7 +17,7 @@ RSpec.shared_examples 'a deploy token creation service' do end it 'returns a DeployToken' do - expect(subject).to be_an_instance_of DeployToken + expect(subject[:deploy_token]).to be_an_instance_of DeployToken end end @@ -25,7 +25,7 @@ RSpec.shared_examples 'a deploy token creation service' do let(:deploy_token_params) { attributes_for(:deploy_token, expires_at: '') } it 'sets Forever.date' do - expect(subject.read_attribute(:expires_at)).to eq(Forever.date) + expect(subject[:deploy_token].read_attribute(:expires_at)).to eq(Forever.date) end end @@ -33,7 +33,7 @@ RSpec.shared_examples 'a deploy token creation service' do let(:deploy_token_params) { attributes_for(:deploy_token, username: '') } it 'converts it to nil' do - expect(subject.read_attribute(:username)).to be_nil + expect(subject[:deploy_token].read_attribute(:username)).to be_nil end end @@ -41,7 +41,7 @@ RSpec.shared_examples 'a deploy token creation service' do let(:deploy_token_params) { attributes_for(:deploy_token, username: 'deployer') } it 'keeps the provided username' do - expect(subject.read_attribute(:username)).to eq('deployer') + expect(subject[:deploy_token].read_attribute(:username)).to eq('deployer') end end |