diff options
author | Valery Sizov <valery@gitlab.com> | 2015-02-05 16:57:27 -0800 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2015-02-05 21:48:21 -0800 |
commit | b3c90dd51418d0c41df4ccd57d9480ea44b35eec (patch) | |
tree | 48135878c66cfdca4a5c1c996cd8e210bf32e157 /spec | |
parent | 85c2cb2a1980d494aef198c59e4f3859b2668ba3 (diff) | |
download | gitlab-ce-b3c90dd51418d0c41df4ccd57d9480ea44b35eec.tar.gz |
GitHub importer refactoring
Diffstat (limited to 'spec')
-rw-r--r-- | spec/controllers/import/github_controller_spec.rb | 12 |
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 |