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:
Diffstat (limited to 'spec/services/groups/transfer_service_spec.rb')
-rw-r--r--spec/services/groups/transfer_service_spec.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/services/groups/transfer_service_spec.rb b/spec/services/groups/transfer_service_spec.rb
index 9a490dfd779..bbf5bbbf814 100644
--- a/spec/services/groups/transfer_service_spec.rb
+++ b/spec/services/groups/transfer_service_spec.rb
@@ -13,7 +13,9 @@ describe Groups::TransferService do
let(:new_parent_group) { create(:group, :public) }
before do
- allow_any_instance_of(described_class).to receive(:update_group_attributes).and_raise(Gitlab::UpdatePathError, 'namespace directory cannot be moved')
+ allow_next_instance_of(described_class) do |instance|
+ allow(instance).to receive(:update_group_attributes).and_raise(Gitlab::UpdatePathError, 'namespace directory cannot be moved')
+ end
create(:group_member, :owner, group: new_parent_group, user: user)
end