diff options
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/custom_emoji_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/models/custom_emoji_spec.rb b/spec/models/custom_emoji_spec.rb index 320a258d3..9de218b4f 100644 --- a/spec/models/custom_emoji_spec.rb +++ b/spec/models/custom_emoji_spec.rb @@ -75,4 +75,13 @@ RSpec.describe CustomEmoji, type: :model do end end end + + describe 'pre_validation' do + let(:custom_emoji) { Fabricate(:custom_emoji, domain: 'wWw.MaStOdOn.CoM') } + + it 'should downcase' do + custom_emoji.valid? + expect(custom_emoji.domain).to eq('www.mastodon.com') + end + end end |