Skip to content
Snippets Groups Projects
Commit 1bd7e06a authored by Sean McGivern's avatar Sean McGivern
Browse files

Merge branch 'sh-backport-update-service-fix' into 'master'

Fix Groups::UpdateService#execute not returning correct error code

See merge request gitlab-org/gitlab-ce!22446
parents 2451bae5 3ea988e8
No related branches found
No related tags found
1 merge request!10495Merge Requests - Assignee
Loading
Loading
@@ -14,9 +14,11 @@ module Groups
group.assign_attributes(params)
 
begin
after_update if group.save
success = group.save
 
true
after_update if success
success
rescue Gitlab::UpdatePathError => e
group.errors.add(:base, e.message)
 
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment