Convert settings/featured_tags
controller->request/system spec (#33880)
This commit is contained in:
parent
dd2cb77f1a
commit
7d20c12913
3 changed files with 56 additions and 74 deletions
|
@ -2,15 +2,23 @@
|
|||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe 'Settings Aliases' do
|
||||
RSpec.describe 'Settings Featured Tags' do
|
||||
describe 'POST /settings/featured_tags' do
|
||||
before { sign_in Fabricate(:user) }
|
||||
context 'when signed in' do
|
||||
before { sign_in Fabricate(:user) }
|
||||
|
||||
it 'gracefully handles invalid nested params' do
|
||||
post settings_featured_tags_path(featured_tag: 'invalid')
|
||||
it 'gracefully handles invalid nested params' do
|
||||
post settings_featured_tags_path(featured_tag: 'invalid')
|
||||
|
||||
expect(response)
|
||||
.to have_http_status(400)
|
||||
expect(response)
|
||||
.to have_http_status(400)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when not signed in' do
|
||||
subject { post settings_featured_tags_path }
|
||||
|
||||
it { is_expected.to redirect_to new_user_session_path }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue