diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-18 00:14:47 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-18 00:14:47 +0300 |
commit | 2a37314a62b83203513ae65c36379bae9db59916 (patch) | |
tree | be14298cb7573474fc6292d5e9993203c7436901 /spec/models | |
parent | 31d92b51ea49fa6669eb9518b1e3e1e5673d9e48 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/deployment_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/models/deployment_spec.rb b/spec/models/deployment_spec.rb index 95708081fe4..87fa5289795 100644 --- a/spec/models/deployment_spec.rb +++ b/spec/models/deployment_spec.rb @@ -1305,6 +1305,19 @@ RSpec.describe Deployment do end end + describe '#tags' do + let_it_be(:project) { create(:project, :repository) } + let_it_be(:deployment) { create(:deployment, project: project) } + + subject { deployment.tags } + + it 'will return tags related to this deployment' do + expect(project.repository).to receive(:tag_names_contains).with(deployment.sha, limit: 100).and_return(['test']) + + is_expected.to match_array(['test']) + end + end + describe '#valid_sha' do it 'does not add errors for a valid SHA' do project = create(:project, :repository) |