mirror of
https://github.com/internetee/registry.git
synced 2025-05-19 02:39:37 +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
44
spec/features/registrant/domain_update_confirm_spec.rb
Normal file
44
spec/features/registrant/domain_update_confirm_spec.rb
Normal file
|
@ -0,0 +1,44 @@
|
|||
require 'rails_helper'
|
||||
|
||||
feature 'DomainUpdateConfirm', type: :feature do
|
||||
context 'as unknown user with domain without update token' do
|
||||
before :all do
|
||||
@domain = Fabricate(:domain)
|
||||
end
|
||||
|
||||
it 'should see warning info if token is missing request' do
|
||||
visit "/registrant/domain_update_confirms/#{@domain.id}"
|
||||
current_path.should == "/registrant/domain_update_confirms/#{@domain.id}"
|
||||
page.should have_text('Domain verification not available')
|
||||
end
|
||||
|
||||
it 'should see warning info if token is missing request' do
|
||||
visit "/registrant/domain_update_confirms/#{@domain.id}"
|
||||
current_path.should == "/registrant/domain_update_confirms/#{@domain.id}"
|
||||
page.should have_text('Domain verification not available')
|
||||
end
|
||||
end
|
||||
|
||||
context 'as unknown user with domain with update token' do
|
||||
before :all do
|
||||
@domain = Fabricate(
|
||||
:domain,
|
||||
registrant_verification_token: '123',
|
||||
registrant_verification_asked_at: Time.zone.now
|
||||
)
|
||||
@domain.domain_statuses.create(value: DomainStatus::PENDING_UPDATE)
|
||||
end
|
||||
|
||||
it 'should see warning info if token is missing in request' do
|
||||
visit "/registrant/domain_update_confirms/#{@domain.id}?token=wrong_token"
|
||||
current_path.should == "/registrant/domain_update_confirms/#{@domain.id}"
|
||||
page.should have_text('Domain verification not available')
|
||||
end
|
||||
|
||||
it 'should show domain info and confirm buttons' do
|
||||
visit "/registrant/domain_update_confirms/#{@domain.id}?token=123"
|
||||
current_path.should == "/registrant/domain_update_confirms/#{@domain.id}"
|
||||
page.should_not have_text('Domain verification not available')
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue