diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
commit | 7e9c479f7de77702622631cff2628a9c8dcbc627 (patch) | |
tree | c8f718a08e110ad7e1894510980d2155a6549197 /spec/controllers/projects/settings/repository_controller_spec.rb | |
parent | e852b0ae16db4052c1c567d9efa4facc81146e88 (diff) |
Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42
Diffstat (limited to 'spec/controllers/projects/settings/repository_controller_spec.rb')
-rw-r--r-- | spec/controllers/projects/settings/repository_controller_spec.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/controllers/projects/settings/repository_controller_spec.rb b/spec/controllers/projects/settings/repository_controller_spec.rb index d93f23ae142..394f1ff28f2 100644 --- a/spec/controllers/projects/settings/repository_controller_spec.rb +++ b/spec/controllers/projects/settings/repository_controller_spec.rb @@ -23,13 +23,15 @@ RSpec.describe Projects::Settings::RepositoryController do describe 'PUT cleanup' do let(:object_map) { fixture_file_upload('spec/fixtures/bfg_object_map.txt') } - it 'enqueues a RepositoryCleanupWorker' do - allow(RepositoryCleanupWorker).to receive(:perform_async) + it 'enqueues a project cleanup' do + expect(Projects::CleanupService) + .to receive(:enqueue) + .with(project, user, anything) + .and_return(status: :success) - put :cleanup, params: { namespace_id: project.namespace, project_id: project, project: { object_map: object_map } } + put :cleanup, params: { namespace_id: project.namespace, project_id: project, project: { bfg_object_map: object_map } } expect(response).to redirect_to project_settings_repository_path(project) - expect(RepositoryCleanupWorker).to have_received(:perform_async).once end end |