diff options
author | Nick Thomas <nick@gitlab.com> | 2018-12-13 17:52:38 +0000 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2018-12-15 13:50:59 +0000 |
commit | e8a675d35f02c6bca9d0e3c8cc116ccd240fa4f6 (patch) | |
tree | cabfec3659295e1cf66b50dfab4e1637c8a1a00b /spec/controllers/projects/settings/repository_controller_spec.rb | |
parent | 0b74b863679a8f55642973eddf25f9e58183d984 (diff) | |
download | gitlab-ce-e8a675d35f02c6bca9d0e3c8cc116ccd240fa4f6.tar.gz |
Remove the project_cleanup feature flag
Diffstat (limited to 'spec/controllers/projects/settings/repository_controller_spec.rb')
-rw-r--r-- | spec/controllers/projects/settings/repository_controller_spec.rb | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/spec/controllers/projects/settings/repository_controller_spec.rb b/spec/controllers/projects/settings/repository_controller_spec.rb index 70f79a47e63..1c6ddfc1864 100644 --- a/spec/controllers/projects/settings/repository_controller_spec.rb +++ b/spec/controllers/projects/settings/repository_controller_spec.rb @@ -19,35 +19,15 @@ describe Projects::Settings::RepositoryController do end describe 'PUT cleanup' do - before do - allow(RepositoryCleanupWorker).to receive(:perform_async) - end + let(:object_map) { fixture_file_upload('spec/fixtures/bfg_object_map.txt') } - def do_put! - object_map = fixture_file_upload('spec/fixtures/bfg_object_map.txt') + it 'enqueues a RepositoryCleanupWorker' do + allow(RepositoryCleanupWorker).to receive(:perform_async) put :cleanup, namespace_id: project.namespace, project_id: project, project: { object_map: object_map } - end - - context 'feature enabled' do - it 'enqueues a RepositoryCleanupWorker' do - stub_feature_flags(project_cleanup: true) - - do_put! - - expect(response).to redirect_to project_settings_repository_path(project) - expect(RepositoryCleanupWorker).to have_received(:perform_async).once - end - end - - context 'feature disabled' do - it 'shows a 404 error' do - stub_feature_flags(project_cleanup: false) - - do_put! - expect(response).to have_gitlab_http_status(404) - end + expect(response).to redirect_to project_settings_repository_path(project) + expect(RepositoryCleanupWorker).to have_received(:perform_async).once end end end |