2023-02-22 00:55:31 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-07-30 09:10:46 +00:00
|
|
|
require 'rails_helper'
|
|
|
|
|
2024-09-04 05:12:25 +00:00
|
|
|
RSpec.describe DomainAllow do
|
2024-01-18 16:11:04 +00:00
|
|
|
describe 'Validations' do
|
2024-09-05 15:36:05 +00:00
|
|
|
it { is_expected.to validate_presence_of(:domain) }
|
2023-03-04 16:16:45 +00:00
|
|
|
|
2024-10-25 08:42:14 +00: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 16:16:45 +00:00
|
|
|
end
|
|
|
|
end
|
2019-07-30 09:10:46 +00:00
|
|
|
end
|