summaryrefslogtreecommitdiff
path: root/spec/services
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-10-18 01:43:49 -0700
committerStan Hu <stanhu@gmail.com>2018-10-18 01:43:49 -0700
commit3ea988e854b09a224e75011d6169d756e394456a (patch)
tree15439d3f5744030b65e48d48193f5d130f41d4c8 /spec/services
parentc5d8e7fcee6bb15376902e8f1336f1ed368b9da8 (diff)
downloadgitlab-ce-3ea988e854b09a224e75011d6169d756e394456a.tar.gz
Fix Groups::UpdateService#execute not returning correct error code
This was causing problems in EE, where audit events were being generated even if the project failed to save.
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/groups/update_service_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/services/groups/update_service_spec.rb b/spec/services/groups/update_service_spec.rb
index 7c5c7409cc1..84cfa53ea05 100644
--- a/spec/services/groups/update_service_spec.rb
+++ b/spec/services/groups/update_service_spec.rb
@@ -24,6 +24,12 @@ describe Groups::UpdateService do
expect(TodosDestroyer::GroupPrivateWorker).not_to receive(:perform_in)
end
+
+ it "returns false if save failed" do
+ allow(public_group).to receive(:save).and_return(false)
+
+ expect(service.execute).to be_falsey
+ end
end
context "internal group with internal project" do