mirror of
https://github.com/internetee/registry.git
synced 2025-06-12 23:54:44 +02:00
Add tests for domain delete confirm UI
This commit is contained in:
parent
59a6251510
commit
1b0c264f54
1 changed files with 32 additions and 0 deletions
|
@ -0,0 +1,32 @@
|
|||
require 'application_system_test_case'
|
||||
|
||||
class DomainDeleteConfirmsTest < ApplicationSystemTestCase
|
||||
setup do
|
||||
@user = users(:registrant)
|
||||
sign_in @user
|
||||
|
||||
@domain = domains(:shop)
|
||||
@domain.registrant_verification_asked!('<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<epp></epp>', @user.id)
|
||||
@domain.pending_delete!
|
||||
end
|
||||
|
||||
def test_enqueues_approve_job_after_verification
|
||||
visit registrant_domain_delete_confirm_url(@domain.id, token: @domain.registrant_verification_token)
|
||||
|
||||
click_on 'Confirm domain delete'
|
||||
assert_text 'Domain registrant change has successfully received.'
|
||||
|
||||
@domain.reload
|
||||
assert_includes @domain.statuses, 'serverHold'
|
||||
end
|
||||
|
||||
def test_enqueues_reject_job_after_verification
|
||||
visit registrant_domain_delete_confirm_url(@domain.id, token: @domain.registrant_verification_token)
|
||||
|
||||
click_on 'Reject domain delete'
|
||||
assert_text 'Domain registrant change has been rejected successfully.'
|
||||
|
||||
@domain.reload
|
||||
assert_equal ['ok'], @domain.statuses
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue