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:
authorValery Sizov <valery@gitlab.com>2015-02-06 03:57:27 +0300
committerValery Sizov <valery@gitlab.com>2015-02-06 08:48:21 +0300
commitb3c90dd51418d0c41df4ccd57d9480ea44b35eec (patch)
tree48135878c66cfdca4a5c1c996cd8e210bf32e157 /spec/controllers/import
parent85c2cb2a1980d494aef198c59e4f3859b2668ba3 (diff)
GitHub importer refactoring
Diffstat (limited to 'spec/controllers/import')
-rw-r--r--spec/controllers/import/github_controller_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/controllers/import/github_controller_spec.rb b/spec/controllers/import/github_controller_spec.rb
index 01063567733..f80b3884d88 100644
--- a/spec/controllers/import/github_controller_spec.rb
+++ b/spec/controllers/import/github_controller_spec.rb
@@ -10,7 +10,7 @@ describe Import::GithubController do
describe "GET callback" do
it "updates access token" do
token = "asdasd12345"
- Gitlab::GithubImport::Client.any_instance.stub_chain(:client, :auth_code, :get_token, :token).and_return(token)
+ Gitlab::GithubImport::Client.any_instance.stub(:get_token).and_return(token)
Gitlab.config.omniauth.providers << OpenStruct.new(app_id: "asd123", app_secret: "asd123", name: "github")
get :callback
@@ -27,8 +27,8 @@ describe Import::GithubController do
it "assigns variables" do
@project = create(:project, import_type: 'github', creator_id: user.id)
- controller.stub_chain(:octo_client, :repos).and_return([@repo])
- controller.stub_chain(:octo_client, :orgs).and_return([])
+ controller.stub_chain(:client, :repos).and_return([@repo])
+ controller.stub_chain(:client, :orgs).and_return([])
get :status
@@ -38,8 +38,8 @@ describe Import::GithubController do
it "does not show already added project" do
@project = create(:project, import_type: 'github', creator_id: user.id, import_source: 'asd/vim')
- controller.stub_chain(:octo_client, :repos).and_return([@repo])
- controller.stub_chain(:octo_client, :orgs).and_return([])
+ controller.stub_chain(:client, :repos).and_return([@repo])
+ controller.stub_chain(:client, :orgs).and_return([])
get :status
@@ -57,7 +57,7 @@ describe Import::GithubController do
namespace = create(:namespace, name: "john", owner: user)
Gitlab::GithubImport::ProjectCreator.should_receive(:new).with(@repo, namespace, user).
and_return(double(execute: true))
- controller.stub_chain(:octo_client, :repo).and_return(@repo)
+ controller.stub_chain(:client, :repo).and_return(@repo)
post :create, format: :js
end