Exercise more of rule_translations/_rule_translation partial (#39266)

This commit is contained in:
Matt Jankowski 2026-06-03 09:22:01 -04:00 committed by GitHub
parent 0ff2c7aedc
commit 65622a52e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,12 +5,14 @@ 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' }
let!(:rule_translation) { Fabricate :rule_translation, rule:, hint: 'Rule translation hint', text: rule.text }
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_text(rule.text)
.and have_text(rule_translation.hint)
end
end