mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-14 11:11:38 -05:00
Update tests
This commit is contained in:
parent
bad0ba2402
commit
29a74fa08c
1 changed files with 0 additions and 20 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue