mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-13 07:49:29 +00:00
Remove duplicate set_locale around action in auth/registrations (#36455)
This commit is contained in:
@@ -135,7 +135,7 @@ class Auth::RegistrationsController < Devise::RegistrationsController
|
||||
@accept_token = session[:accept_token] = SecureRandom.hex
|
||||
@invite_code = invite_code
|
||||
|
||||
set_locale { render :rules }
|
||||
render :rules
|
||||
end
|
||||
|
||||
def is_flashing_format? # rubocop:disable Naming/PredicatePrefix
|
||||
|
||||
@@ -3,6 +3,17 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe 'Auth Registration' do
|
||||
context 'when there are server rules' do
|
||||
let!(:rule) { Fabricate :rule, text: 'You must be seven meters tall' }
|
||||
|
||||
it 'shows rules page before proceeding with sign up' do
|
||||
visit new_user_registration_path
|
||||
expect(page)
|
||||
.to have_title(I18n.t('auth.register'))
|
||||
.and have_content(rule.text)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when age verification is enabled' do
|
||||
before { Setting.min_age = 16 }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user