0
0
Fork 0

Convert settings/featured_tags controller->request/system spec (#33880)

This commit is contained in:
Matt Jankowski 2025-02-11 01:45:34 -05:00 committed by GitHub
parent dd2cb77f1a
commit 7d20c12913
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 56 additions and 74 deletions

View file

@ -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