mirror of
https://github.com/internetee/registry.git
synced 2025-07-03 09:43:36 +02:00
Add more invalid and valid domains to tests
This commit is contained in:
parent
a23ac67b7f
commit
5d3c292f85
1 changed files with 2 additions and 2 deletions
|
@ -11,13 +11,13 @@ describe Domain do
|
|||
d = Fabricate(:domain)
|
||||
expect(d.name).to_not be_nil
|
||||
|
||||
invalid = ['a.ee', "#{'a' * 64}.ee", 'ab.eu', 'test.ab.ee', '-test.ee', '-test-.ee', 'test-.ee', 'te--st.ee']
|
||||
invalid = ['a.ee', "#{'a' * 64}.ee", 'ab.eu', 'test.ab.ee', '-test.ee', '-test-.ee', 'test-.ee', 'te--st.ee', 'õ.pri.ee']
|
||||
|
||||
invalid.each do |x|
|
||||
expect(Fabricate.build(:domain, name: x).valid?).to be false
|
||||
end
|
||||
|
||||
valid = ['ab.ee', "#{'a' * 63}.ee", 'te-s-t.ee']
|
||||
valid = ['ab.ee', "#{'a' * 63}.ee", 'te-s-t.ee', 'jäääär.ee', 'päike.pri.ee', 'õigus.edu.ee', 'õäöü.aip.ee', 'test.org.ee', 'test.med.ee', 'test.riik.ee']
|
||||
|
||||
valid.each do |x|
|
||||
expect(Fabricate.build(:domain, name: x).valid?).to be true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue