Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-25 09:07:58 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-25 09:07:58 +0300
commit9c83aadd2604e7e6cb1f84683f951e6b12872618 (patch)
treec0a14c87378e832e87580be382e1c8ccea188b71 /spec/models/environment_spec.rb
parent23bc19cb73aad969c9636b8b935111645e809e54 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/environment_spec.rb')
-rw-r--r--spec/models/environment_spec.rb9
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