mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 17:37:17 +02:00
Registrant change now requires EPP verify attribute
This commit is contained in:
parent
7d0365974e
commit
d72cbc20f5
21 changed files with 318 additions and 29 deletions
34
spec/models/registrant_verification_spec.rb
Normal file
34
spec/models/registrant_verification_spec.rb
Normal file
|
@ -0,0 +1,34 @@
|
|||
require 'rails_helper'
|
||||
|
||||
describe RegistrantVerification do
|
||||
context 'with invalid attribute' do
|
||||
before :all do
|
||||
@registrant_verification = RegistrantVerification.new
|
||||
end
|
||||
|
||||
it 'should not be valid' do
|
||||
@registrant_verification.valid?
|
||||
@registrant_verification.errors.full_messages.should match_array([
|
||||
"Domain name is missing",
|
||||
"Verification token is missing"
|
||||
])
|
||||
end
|
||||
end
|
||||
|
||||
context 'with valid attributes' do
|
||||
before :all do
|
||||
@registrant_verification = Fabricate(:registrant_verification)
|
||||
end
|
||||
|
||||
it 'should be valid' do
|
||||
@registrant_verification.valid?
|
||||
@registrant_verification.errors.full_messages.should match_array([])
|
||||
end
|
||||
|
||||
it 'should be valid twice' do
|
||||
@registrant_verification = Fabricate(:registrant_verification)
|
||||
@registrant_verification.valid?
|
||||
@registrant_verification.errors.full_messages.should match_array([])
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue