Update tests

This commit is contained in:
Eugene Burmakin 2025-06-02 21:17:06 +02:00
parent bad0ba2402
commit 29a74fa08c

View file

@ -170,26 +170,6 @@ RSpec.describe '/settings/background_jobs', type: :request do
end
end
end
describe 'DELETE /destroy' do
it 'redirects to root page' do
delete settings_background_job_url('queue_name')
expect(response).to redirect_to(root_url)
expect(flash[:notice]).to eq('You are not authorized to perform this action.')
end
end
context 'when user is an admin' do
before { sign_in create(:user, :admin) }
it 'redirects to root page' do
get settings_background_jobs_url
expect(response).to redirect_to(root_url)
expect(flash[:notice]).to eq('You are not authorized to perform this action.')
end
end
end
end
end