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

This commit is contained in:
KMY 2024-09-06 08:42:24 +09:00
commit f18eabfe75
689 changed files with 4369 additions and 2434 deletions

View file

@ -125,22 +125,9 @@ RSpec.describe CustomEmoji, :attachment_processing do
end
describe 'Normalizations' do
describe 'downcase domain value' do
context 'with a mixed case domain value' do
it 'normalizes the value to downcased' do
custom_emoji = Fabricate.build(:custom_emoji, domain: 'wWw.MaStOdOn.CoM')
expect(custom_emoji.domain).to eq('www.mastodon.com')
end
end
context 'with a nil domain value' do
it 'leaves the value as nil' do
custom_emoji = Fabricate.build(:custom_emoji, domain: nil)
expect(custom_emoji.domain).to be_nil
end
end
describe 'domain' do
it { is_expected.to normalize(:domain).from('wWw.MaStOdOn.CoM').to('www.mastodon.com') }
it { is_expected.to normalize(:domain).from(nil).to(nil) }
end
end
end