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/lib/gitlab/github_import_spec.rb')
-rw-r--r--spec/lib/gitlab/github_import_spec.rb23
1 files changed, 0 insertions, 23 deletions
diff --git a/spec/lib/gitlab/github_import_spec.rb b/spec/lib/gitlab/github_import_spec.rb
index 8453f002bc0..1721f470b33 100644
--- a/spec/lib/gitlab/github_import_spec.rb
+++ b/spec/lib/gitlab/github_import_spec.rb
@@ -11,8 +11,6 @@ RSpec.describe Gitlab::GithubImport, feature_category: :importers do
let(:project) { double(:project, import_url: 'http://t0ken@github.com/user/repo.git', id: 1, group: nil) }
it 'returns a new Client with a custom token' do
- allow(project).to receive(:import_data)
-
expect(described_class::Client)
.to receive(:new)
.with('123', host: nil, parallel: true, per_page: 100)
@@ -26,7 +24,6 @@ RSpec.describe Gitlab::GithubImport, feature_category: :importers do
expect(project)
.to receive(:import_data)
.and_return(import_data)
- .twice
expect(described_class::Client)
.to receive(:new)
@@ -49,31 +46,12 @@ RSpec.describe Gitlab::GithubImport, feature_category: :importers do
described_class.ghost_user_id
end
end
-
- context 'when there are additional access tokens' do
- it 'returns a new ClientPool containing all tokens' do
- import_data = double(:import_data, credentials: { user: '123', additional_access_tokens: %w[foo bar] })
-
- expect(project)
- .to receive(:import_data)
- .and_return(import_data)
- .twice
-
- expect(described_class::ClientPool)
- .to receive(:new)
- .with(token_pool: %w[foo bar 123], host: nil, parallel: true, per_page: 100)
-
- described_class.new_client_for(project)
- end
- end
end
context 'GitHub Enterprise' do
let(:project) { double(:project, import_url: 'http://t0ken@github.another-domain.com/repo-org/repo.git', group: nil) }
it 'returns a new Client with a custom token' do
- allow(project).to receive(:import_data)
-
expect(described_class::Client)
.to receive(:new)
.with('123', host: 'http://github.another-domain.com/api/v3', parallel: true, per_page: 100)
@@ -87,7 +65,6 @@ RSpec.describe Gitlab::GithubImport, feature_category: :importers do
expect(project)
.to receive(:import_data)
.and_return(import_data)
- .twice
expect(described_class::Client)
.to receive(:new)