From 99aa31992d4398d35c9df4854f5fb494984a9e0b Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 15 Sep 2022 18:10:36 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/controllers/import/github_controller_spec.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'spec/controllers/import') 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 -- cgit v1.2.1