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:
Diffstat (limited to 'spec/controllers/import/github_controller_spec.rb')
-rw-r--r--spec/controllers/import/github_controller_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/controllers/import/github_controller_spec.rb b/spec/controllers/import/github_controller_spec.rb
index f80b3884d88..30bf54a908c 100644
--- a/spec/controllers/import/github_controller_spec.rb
+++ b/spec/controllers/import/github_controller_spec.rb
@@ -10,13 +10,13 @@ describe Import::GithubController do
describe "GET callback" do
it "updates access token" do
token = "asdasd12345"
- Gitlab::GithubImport::Client.any_instance.stub(:get_token).and_return(token)
+ allow_any_instance_of(Gitlab::GithubImport::Client).to receive(:get_token).and_return(token)
Gitlab.config.omniauth.providers << OpenStruct.new(app_id: "asd123", app_secret: "asd123", name: "github")
get :callback
- user.reload.github_access_token.should == token
- controller.should redirect_to(status_import_github_url)
+ expect(user.reload.github_access_token).to eq(token)
+ expect(controller).to redirect_to(status_import_github_url)
end
end
@@ -55,7 +55,7 @@ describe Import::GithubController do
it "takes already existing namespace" do
namespace = create(:namespace, name: "john", owner: user)
- Gitlab::GithubImport::ProjectCreator.should_receive(:new).with(@repo, namespace, user).
+ expect(Gitlab::GithubImport::ProjectCreator).to receive(:new).with(@repo, namespace, user).
and_return(double(execute: true))
controller.stub_chain(:client, :repo).and_return(@repo)