mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-13 15:58:50 +00:00
Convert settings/featured_tags controller->request/system spec (#33880)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user