diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2018-04-23 15:48:26 +0000 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2018-04-23 15:48:26 +0000 |
commit | ab286656b22dd686a659afe908daade6e5a54ff3 (patch) | |
tree | 538fb10cb2979c616754e492d8fe44500e760a37 /spec/controllers/import | |
parent | 3d12ce95b1307f9b8439aab9ac5fe9d406ab9b01 (diff) | |
download | gitlab-ce-ab286656b22dd686a659afe908daade6e5a54ff3.tar.gz |
Resolve "Namespace factory is problematic"
Diffstat (limited to 'spec/controllers/import')
-rw-r--r-- | spec/controllers/import/bitbucket_controller_spec.rb | 5 | ||||
-rw-r--r-- | spec/controllers/import/gitlab_controller_spec.rb | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/spec/controllers/import/bitbucket_controller_spec.rb b/spec/controllers/import/bitbucket_controller_spec.rb index 2be46049aab..be49b92d23f 100644 --- a/spec/controllers/import/bitbucket_controller_spec.rb +++ b/spec/controllers/import/bitbucket_controller_spec.rb @@ -223,11 +223,12 @@ describe Import::BitbucketController do end context 'user has chosen an existing nested namespace and name for the project', :postgresql do - let(:parent_namespace) { create(:group, name: 'foo', owner: user) } + let(:parent_namespace) { create(:group, name: 'foo') } let(:nested_namespace) { create(:group, name: 'bar', parent: parent_namespace) } let(:test_name) { 'test_name' } before do + parent_namespace.add_owner(user) nested_namespace.add_owner(user) end @@ -273,7 +274,7 @@ describe Import::BitbucketController do context 'user has chosen existent and non-existent nested namespaces and name for the project', :postgresql do let(:test_name) { 'test_name' } - let!(:parent_namespace) { create(:group, name: 'foo', owner: user) } + let!(:parent_namespace) { create(:group, name: 'foo') } before do parent_namespace.add_owner(user) diff --git a/spec/controllers/import/gitlab_controller_spec.rb b/spec/controllers/import/gitlab_controller_spec.rb index e958be077c2..742f4787126 100644 --- a/spec/controllers/import/gitlab_controller_spec.rb +++ b/spec/controllers/import/gitlab_controller_spec.rb @@ -196,10 +196,11 @@ describe Import::GitlabController do end context 'user has chosen an existing nested namespace for the project', :postgresql do - let(:parent_namespace) { create(:group, name: 'foo', owner: user) } + let(:parent_namespace) { create(:group, name: 'foo') } let(:nested_namespace) { create(:group, name: 'bar', parent: parent_namespace) } before do + parent_namespace.add_owner(user) nested_namespace.add_owner(user) end @@ -245,7 +246,7 @@ describe Import::GitlabController do context 'user has chosen existent and non-existent nested namespaces and name for the project', :postgresql do let(:test_name) { 'test_name' } - let!(:parent_namespace) { create(:group, name: 'foo', owner: user) } + let!(:parent_namespace) { create(:group, name: 'foo') } before do parent_namespace.add_owner(user) |