Convert settings/exports
controller spec to system/request specs (#31965)
This commit is contained in:
parent
2946a9286b
commit
5a8f2fe31d
3 changed files with 65 additions and 47 deletions
25
spec/requests/settings/exports_spec.rb
Normal file
25
spec/requests/settings/exports_spec.rb
Normal file
|
@ -0,0 +1,25 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe 'Settings / Exports' do
|
||||
context 'when not signed in' do
|
||||
describe 'GET /settings/export' do
|
||||
it 'redirects to sign in page' do
|
||||
get settings_export_path
|
||||
|
||||
expect(response)
|
||||
.to redirect_to new_user_session_path
|
||||
end
|
||||
end
|
||||
|
||||
describe 'POST /settings/export' do
|
||||
it 'redirects to sign in page' do
|
||||
post settings_export_path
|
||||
|
||||
expect(response)
|
||||
.to redirect_to new_user_session_path
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue