diff options
Diffstat (limited to 'spec/lib/gitlab/github_import/importer/pull_requests_importer_spec.rb')
-rw-r--r-- | spec/lib/gitlab/github_import/importer/pull_requests_importer_spec.rb | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/spec/lib/gitlab/github_import/importer/pull_requests_importer_spec.rb b/spec/lib/gitlab/github_import/importer/pull_requests_importer_spec.rb index 133d515246a..067b8b09516 100644 --- a/spec/lib/gitlab/github_import/importer/pull_requests_importer_spec.rb +++ b/spec/lib/gitlab/github_import/importer/pull_requests_importer_spec.rb @@ -148,7 +148,7 @@ RSpec.describe Gitlab::GithubImport::Importer::PullRequestsImporter do end end - shared_examples '#update_repository' do + describe '#update_repository' do it 'updates the repository' do importer = described_class.new(project, client) @@ -162,6 +162,10 @@ RSpec.describe Gitlab::GithubImport::Importer::PullRequestsImporter do .to receive(:increment) .and_call_original + expect(project.repository) + .to receive(:fetch_remote) + .with(url, forced: false, refmap: Gitlab::GithubImport.refmap) + freeze_time do importer.update_repository @@ -170,28 +174,6 @@ RSpec.describe Gitlab::GithubImport::Importer::PullRequestsImporter do end end - describe '#update_repository with :fetch_remote_params enabled' do - before do - stub_feature_flags(fetch_remote_params: true) - expect(project.repository) - .to receive(:fetch_remote) - .with('github', forced: false, url: url, refmap: Gitlab::GithubImport.refmap) - end - - it_behaves_like '#update_repository' - end - - describe '#update_repository with :fetch_remote_params disabled' do - before do - stub_feature_flags(fetch_remote_params: false) - expect(project.repository) - .to receive(:fetch_remote) - .with('github', forced: false) - end - - it_behaves_like '#update_repository' - end - describe '#update_repository?' do let(:importer) { described_class.new(project, client) } |