diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-30 15:10:26 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-30 15:10:26 +0300 |
commit | 19c9422e1f3792680aa3f9e6190218b31a838fe3 (patch) | |
tree | 36deaed9777d38e0acea456d3aacaf5b5f800958 /spec/services/projects/transfer_service_spec.rb | |
parent | 915a5b6e89195aab5d7eb0deb16e4825cfce509e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/projects/transfer_service_spec.rb')
-rw-r--r-- | spec/services/projects/transfer_service_spec.rb | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/spec/services/projects/transfer_service_spec.rb b/spec/services/projects/transfer_service_spec.rb index c47d44002cc..93b7ce56247 100644 --- a/spec/services/projects/transfer_service_spec.rb +++ b/spec/services/projects/transfer_service_spec.rb @@ -169,7 +169,7 @@ RSpec.describe Projects::TransferService do end end - context 'when project has pending builds' do + context 'when project has pending builds', :sidekiq_inline do let!(:other_project) { create(:project) } let!(:pending_build) { create(:ci_pending_build, project: project.reload) } let!(:unrelated_pending_build) { create(:ci_pending_build, project: other_project) } @@ -189,6 +189,20 @@ RSpec.describe Projects::TransferService do expect(unrelated_pending_build.namespace_id).to eq(other_project.namespace_id) expect(unrelated_pending_build.namespace_traversal_ids).to eq(other_project.namespace.traversal_ids) end + + context 'when ci_pending_builds_async_update is disabled' do + let(:update_pending_build_service) { instance_double(::Ci::PendingBuilds::UpdateProjectWorker) } + + before do + stub_feature_flags(ci_pending_builds_async_update: false) + end + + it 'does not call the new worker' do + expect(::Ci::PendingBuilds::UpdateProjectWorker).not_to receive(:perform_async) + + execute_transfer + end + end end end @@ -251,7 +265,7 @@ RSpec.describe Projects::TransferService do ) end - context 'when project has pending builds' do + context 'when project has pending builds', :sidekiq_inline do let!(:other_project) { create(:project) } let!(:pending_build) { create(:ci_pending_build, project: project.reload) } let!(:unrelated_pending_build) { create(:ci_pending_build, project: other_project) } |