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.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/controllers/import/github_controller_spec.rb b/spec/controllers/import/github_controller_spec.rb
index 46160aac0c1..269eb62cae6 100644
--- a/spec/controllers/import/github_controller_spec.rb
+++ b/spec/controllers/import/github_controller_spec.rb
@@ -134,7 +134,7 @@ RSpec.describe Import::GithubController do
it 'fetches repos using legacy client' do
expect_next_instance_of(Gitlab::LegacyGithubImport::Client) do |client|
- expect(client).to receive(:repos)
+ expect(client).to receive(:repos).and_return([])
end
get :status
@@ -164,8 +164,8 @@ RSpec.describe Import::GithubController do
end
it 'fetches repos using latest github client' do
- expect_next_instance_of(Octokit::Client) do |client|
- expect(client).to receive(:repos).and_return([].to_enum)
+ expect_next_instance_of(Gitlab::GithubImport::Client) do |client|
+ expect(client).to receive(:repos).and_return([])
end
get :status
@@ -184,8 +184,8 @@ RSpec.describe Import::GithubController do
context 'pagination' do
context 'when no page is specified' do
it 'requests first page' do
- expect_next_instance_of(Octokit::Client) do |client|
- expect(client).to receive(:repos).with(nil, { page: 1, per_page: 25 }).and_return([].to_enum)
+ expect_next_instance_of(Gitlab::GithubImport::Client) do |client|
+ expect(client).to receive(:repos).with({ page: 1, per_page: 25 }).and_return([])
end
get :status