Remove duplicate set_locale around action in auth/registrations (#36455)

This commit is contained in:
Matt Jankowski
2025-12-03 10:34:10 -05:00
committed by GitHub
parent 4e6d1892b9
commit b3b5bf26d1
2 changed files with 12 additions and 1 deletions

View File

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

View File

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