diff options
author | Dylan Griffith <dyl.griffith@gmail.com> | 2018-12-07 12:16:48 +0100 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-12-07 13:12:35 +0100 |
commit | f31429c1f6881505bc4079355a68f280dedd240d (patch) | |
tree | 8dcb0210966e3d1d78bd6fc97b3ee21ba5d91d02 /spec/controllers/projects/settings | |
parent | 5d9a2e3b1e3b3e5b41c0968f22ee679275125610 (diff) | |
download | gitlab-ce-f31429c1f6881505bc4079355a68f280dedd240d.tar.gz |
Remove Sidekiq::Testing in RepositoryController spec
Diffstat (limited to 'spec/controllers/projects/settings')
-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 69ec971bb75..70f79a47e63 100644 --- a/spec/controllers/projects/settings/repository_controller_spec.rb +++ b/spec/controllers/projects/settings/repository_controller_spec.rb @@ -19,12 +19,14 @@ describe Projects::Settings::RepositoryController do end describe 'PUT cleanup' do + before do + allow(RepositoryCleanupWorker).to receive(:perform_async) + end + def do_put! object_map = fixture_file_upload('spec/fixtures/bfg_object_map.txt') - Sidekiq::Testing.fake! do - put :cleanup, namespace_id: project.namespace, project_id: project, project: { object_map: object_map } - end + put :cleanup, namespace_id: project.namespace, project_id: project, project: { object_map: object_map } end context 'feature enabled' do @@ -34,7 +36,7 @@ describe Projects::Settings::RepositoryController do do_put! expect(response).to redirect_to project_settings_repository_path(project) - expect(RepositoryCleanupWorker.jobs.count).to eq(1) + expect(RepositoryCleanupWorker).to have_received(:perform_async).once end end |