diff options
Diffstat (limited to 'spec/controllers/import')
| -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 |
