summaryrefslogtreecommitdiff
path: root/spec/services/groups
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2018-04-23 15:48:26 +0000
committerNick Thomas <nick@gitlab.com>2018-04-23 15:48:26 +0000
commitab286656b22dd686a659afe908daade6e5a54ff3 (patch)
tree538fb10cb2979c616754e492d8fe44500e760a37 /spec/services/groups
parent3d12ce95b1307f9b8439aab9ac5fe9d406ab9b01 (diff)
downloadgitlab-ce-ab286656b22dd686a659afe908daade6e5a54ff3.tar.gz
Resolve "Namespace factory is problematic"
Diffstat (limited to 'spec/services/groups')
-rw-r--r--spec/services/groups/nested_create_service_spec.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/services/groups/nested_create_service_spec.rb b/spec/services/groups/nested_create_service_spec.rb
index 6491fb34777..86fdd43c1e5 100644
--- a/spec/services/groups/nested_create_service_spec.rb
+++ b/spec/services/groups/nested_create_service_spec.rb
@@ -59,8 +59,11 @@ describe Groups::NestedCreateService do
describe "#execute" do
it 'returns the group if it already existed' do
- parent = create(:group, path: 'a-group', owner: user)
- child = create(:group, path: 'a-sub-group', parent: parent, owner: user)
+ parent = create(:group, path: 'a-group')
+ child = create(:group, path: 'a-sub-group', parent: parent)
+
+ parent.add_owner(user)
+ child.add_owner(user)
expect(service.execute).to eq(child)
end