Add validation assertion in AccountWarningPreset model spec (#40242)

This commit is contained in:
Matt Jankowski
2026-08-24 08:46:34 +00:00
committed by GitHub
parent 2bd80bdc3d
commit 192fc7d6f2

View File

@@ -3,7 +3,11 @@
require 'rails_helper'
RSpec.describe AccountWarningPreset do
describe 'alphabetical' do
describe 'Validations' do
it { is_expected.to validate_presence_of(:text) }
end
describe '.alphabetical' do
let(:first) { Fabricate(:account_warning_preset, title: 'aaa', text: 'aaa') }
let(:second) { Fabricate(:account_warning_preset, title: 'bbb', text: 'aaa') }
let(:third) { Fabricate(:account_warning_preset, title: 'bbb', text: 'bbb') }