Commit 2d5765bd authored by Valery Sizov's avatar Valery Sizov

gitlab.com importer: fix specs after refactoring

parent 93585661
...@@ -10,7 +10,7 @@ describe Import::GithubController do ...@@ -10,7 +10,7 @@ describe Import::GithubController do
describe "GET callback" do describe "GET callback" do
it "updates access token" do it "updates access token" do
token = "asdasd12345" token = "asdasd12345"
Gitlab::Github::Client.any_instance.stub_chain(:client, :auth_code, :get_token, :token).and_return(token) Gitlab::GithubImport::Client.any_instance.stub_chain(:client, :auth_code, :get_token, :token).and_return(token)
Gitlab.config.omniauth.providers << OpenStruct.new(app_id: "asd123", app_secret: "asd123", name: "github") Gitlab.config.omniauth.providers << OpenStruct.new(app_id: "asd123", app_secret: "asd123", name: "github")
get :callback get :callback
...@@ -55,7 +55,7 @@ describe Import::GithubController do ...@@ -55,7 +55,7 @@ describe Import::GithubController do
it "takes already existing namespace" do it "takes already existing namespace" do
namespace = create(:namespace, name: "john", owner: user) namespace = create(:namespace, name: "john", owner: user)
Gitlab::Github::ProjectCreator.should_receive(:new).with(@repo, namespace, user). Gitlab::GithubImport::ProjectCreator.should_receive(:new).with(@repo, namespace, user).
and_return(double(execute: true)) and_return(double(execute: true))
controller.stub_chain(:octo_client, :repo).and_return(@repo) controller.stub_chain(:octo_client, :repo).and_return(@repo)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment