diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-25 06:07:58 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-25 06:07:58 +0000 |
commit | 9c83aadd2604e7e6cb1f84683f951e6b12872618 (patch) | |
tree | c0a14c87378e832e87580be382e1c8ccea188b71 /spec/models/environment_spec.rb | |
parent | 23bc19cb73aad969c9636b8b935111645e809e54 (diff) | |
download | gitlab-ce-9c83aadd2604e7e6cb1f84683f951e6b12872618.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/environment_spec.rb')
-rw-r--r-- | spec/models/environment_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/models/environment_spec.rb b/spec/models/environment_spec.rb index 6020db09ccf..896203d8669 100644 --- a/spec/models/environment_spec.rb +++ b/spec/models/environment_spec.rb @@ -1301,4 +1301,13 @@ describe Environment, :use_clean_rails_memory_store_caching do end end end + + describe '#destroy' do + it 'remove the deployment refs from gitaly' do + deployment = create(:deployment, :success, environment: environment, project: project) + deployment.create_ref + + expect { environment.destroy }.to change { project.commit(deployment.ref_path) }.to(nil) + end + end end |