From 56a41ceb7aa3250c4ac7e6fc466a1ddb6bceda25 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Fri, 9 Feb 2018 13:14:29 -0600 Subject: [PATCH] Resolve failures in GitHub-ish import controller specs --- .../githubish_import_controller_shared_examples.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/support/controllers/githubish_import_controller_shared_examples.rb b/spec/support/controllers/githubish_import_controller_shared_examples.rb index e848efd402f..3321f920666 100644 --- a/spec/support/controllers/githubish_import_controller_shared_examples.rb +++ b/spec/support/controllers/githubish_import_controller_shared_examples.rb @@ -333,7 +333,7 @@ shared_examples 'a GitHub-ish import controller: POST create' do it 'does not create a new namespace under the user namespace' do expect(Gitlab::LegacyGithubImport::ProjectCreator) .to receive(:new).with(provider_repo, test_name, user.namespace, user, access_params, type: provider) - .and_return(double(execute: true)) + .and_return(double(execute: build_stubbed(:project))) expect { post :create, { target_namespace: "#{user.namespace_path}/test_group", new_name: test_name, format: :js } } .not_to change { Namespace.count } @@ -347,7 +347,7 @@ shared_examples 'a GitHub-ish import controller: POST create' do it 'does not take the selected namespace and name' do expect(Gitlab::LegacyGithubImport::ProjectCreator) .to receive(:new).with(provider_repo, test_name, user.namespace, user, access_params, type: provider) - .and_return(double(execute: true)) + .and_return(double(execute: build_stubbed(:project))) post :create, { target_namespace: 'foo/foobar/bar', new_name: test_name, format: :js } end @@ -355,7 +355,7 @@ shared_examples 'a GitHub-ish import controller: POST create' do it 'does not create the namespaces' do allow(Gitlab::LegacyGithubImport::ProjectCreator) .to receive(:new).with(provider_repo, test_name, kind_of(Namespace), user, access_params, type: provider) - .and_return(double(execute: true)) + .and_return(double(execute: build_stubbed(:project))) expect { post :create, { target_namespace: 'foo/foobar/bar', new_name: test_name, format: :js } } .not_to change { Namespace.count } @@ -372,7 +372,7 @@ shared_examples 'a GitHub-ish import controller: POST create' do expect(Gitlab::LegacyGithubImport::ProjectCreator) .to receive(:new).with(provider_repo, test_name, group, user, access_params, type: provider) - .and_return(double(execute: true)) + .and_return(double(execute: build_stubbed(:project))) post :create, { target_namespace: 'foo', new_name: test_name, format: :js } end