Merge remote-tracking branch 'parent/main' into upstream-20241231

This commit is contained in:
KMY 2024-12-31 11:56:36 +09:00
commit 3c77d4e8e4
268 changed files with 4213 additions and 3029 deletions

View file

@ -18,6 +18,14 @@ RSpec.describe UserRole do
end
end
describe 'position' do
subject { Fabricate.build :user_role }
let(:limit) { described_class::POSITION_LIMIT }
it { is_expected.to validate_numericality_of(:position).is_in(-limit..limit) }
end
describe 'color' do
it { is_expected.to allow_values('#112233', '#aabbcc', '').for(:color) }
it { is_expected.to_not allow_values('x', '112233445566', '#xxyyzz').for(:color) }