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:
authorJames Edwards-Jones <jedwardsjones@gitlab.com>2018-03-24 14:05:04 +0300
committerJames Edwards-Jones <jedwardsjones@gitlab.com>2018-03-26 12:29:52 +0300
commite7061396666074c799780a9fc4090267c3b87e12 (patch)
treea6ef06df1306b3c462bc9785f223903018e278f4 /spec/services/protected_branches
parent1f7328f8ee6a86b1c8e50b7451450e90d78b9424 (diff)
DestroyService for protected tags/branches used from controller
Diffstat (limited to 'spec/services/protected_branches')
-rw-r--r--spec/services/protected_branches/destroy_service_spec.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/services/protected_branches/destroy_service_spec.rb b/spec/services/protected_branches/destroy_service_spec.rb
new file mode 100644
index 00000000000..79eff417943
--- /dev/null
+++ b/spec/services/protected_branches/destroy_service_spec.rb
@@ -0,0 +1,17 @@
+require 'spec_helper'
+
+describe ProtectedBranches::DestroyService do
+ let(:protected_branch) { create(:protected_branch) }
+ let(:project) { protected_branch.project }
+ let(:user) { project.owner }
+
+ describe '#execute' do
+ subject(:service) { described_class.new(project, user) }
+
+ it 'destroys a protected branch' do
+ service.execute(protected_branch)
+
+ expect(protected_branch).to be_destroyed
+ end
+ end
+end