summaryrefslogtreecommitdiff
path: root/spec/support/services/deploy_token_shared_examples.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/services/deploy_token_shared_examples.rb')
-rw-r--r--spec/support/services/deploy_token_shared_examples.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/support/services/deploy_token_shared_examples.rb b/spec/support/services/deploy_token_shared_examples.rb
index adc5ea0fcdc..d322b3fc81d 100644
--- a/spec/support/services/deploy_token_shared_examples.rb
+++ b/spec/support/services/deploy_token_shared_examples.rb
@@ -19,6 +19,10 @@ RSpec.shared_examples 'a deploy token creation service' do
it 'returns a DeployToken' do
expect(subject[:deploy_token]).to be_an_instance_of DeployToken
end
+
+ it 'sets the creator_id as the id of the current_user' do
+ expect(subject[:deploy_token].read_attribute(:creator_id)).to eq(user.id)
+ end
end
context 'when expires at date is not passed' do