mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-22 23:20:44 +01:00
15 lines
373 B
Ruby
15 lines
373 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'rails_helper'
|
|
|
|
RSpec.describe DomainAllow do
|
|
describe 'Validations' do
|
|
it { is_expected.to validate_presence_of(:domain) }
|
|
|
|
context 'when a normalized domain exists' do
|
|
before { Fabricate(:domain_allow, domain: 'にゃん') }
|
|
|
|
it { is_expected.to_not allow_value('xn--r9j5b5b').for(:domain) }
|
|
end
|
|
end
|
|
end
|