mirror of
https://github.com/internetee/registry.git
synced 2025-06-08 05:34:46 +02:00
parent
a49b592fac
commit
b5870d3eb5
4 changed files with 34 additions and 2 deletions
|
@ -1,6 +1,8 @@
|
|||
require 'test_helper'
|
||||
|
||||
class AdminAreaDomainForceDeleteTest < ActionDispatch::IntegrationTest
|
||||
include ActionMailer::TestHelper
|
||||
|
||||
def setup
|
||||
login_as users(:admin)
|
||||
@domain = domains(:shop)
|
||||
|
@ -19,11 +21,25 @@ class AdminAreaDomainForceDeleteTest < ActionDispatch::IntegrationTest
|
|||
@domain.reload
|
||||
|
||||
assert @domain.force_delete_scheduled?
|
||||
assert_equal 1, ActionMailer::Base.deliveries.size
|
||||
assert_current_path edit_admin_domain_path(@domain)
|
||||
assert_text 'Force delete procedure has been scheduled'
|
||||
end
|
||||
|
||||
def test_notifies_registrant_and_admin_contacts_by_email_by_default
|
||||
assert_emails 1 do
|
||||
visit edit_admin_domain_url(@domain)
|
||||
click_link_or_button 'Force delete domain'
|
||||
end
|
||||
end
|
||||
|
||||
def test_allows_to_skip_notifying_registrant_and_admin_contacts_by_email
|
||||
assert_no_emails do
|
||||
visit edit_admin_domain_url(@domain)
|
||||
uncheck 'notify_by_email'
|
||||
click_link_or_button 'Force delete domain'
|
||||
end
|
||||
end
|
||||
|
||||
def test_cancels_scheduled_domain_force_delete
|
||||
@domain.update_attribute(:statuses, [DomainStatus::FORCE_DELETE])
|
||||
assert @domain.force_delete_scheduled?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue