2023-02-22 01:55:31 +01:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-07-30 11:10:46 +02:00
|
|
|
require 'rails_helper'
|
|
|
|
|
2024-09-04 07:12:25 +02:00
|
|
|
RSpec.describe DomainAllow do
|
2024-01-18 17:11:04 +01:00
|
|
|
describe 'Validations' do
|
2024-09-05 17:36:05 +02:00
|
|
|
it { is_expected.to validate_presence_of(:domain) }
|
2023-03-04 17:16:45 +01:00
|
|
|
|
2024-10-25 10:42:14 +02:00
|
|
|
context 'when a normalized domain exists' do
|
|
|
|
before { Fabricate(:domain_allow, domain: 'にゃん') }
|
|
|
|
|
|
|
|
it { is_expected.to_not allow_value('xn--r9j5b5b').for(:domain) }
|
2023-03-04 17:16:45 +01:00
|
|
|
end
|
|
|
|
end
|
2019-07-30 11:10:46 +02:00
|
|
|
end
|