Delete discarded domains at the random moment within next 24h

#790
This commit is contained in:
Artur Beljajev 2018-04-20 16:55:36 +03:00
parent 60a66942d1
commit 3e94c10da1
8 changed files with 105 additions and 31 deletions

View file

@ -7,20 +7,15 @@ class AdminAreaDomainDetailsTest < ActionDispatch::IntegrationTest
end
def test_discarded_domain_has_corresponding_label
travel_to Time.zone.parse('2010-07-05 10:30')
@domain.delete_at = Time.zone.parse('2010-07-05 10:00')
visit admin_domain_url(@domain)
assert_no_css 'span.label.label-warning', text: 'deleteCandidate'
@domain.discard
visit admin_domain_url(@domain)
assert_css 'span.label.label-warning', text: 'deleteCandidate'
end
def test_keep_a_domain
@domain.discard
visit edit_admin_domain_url(@domain)
click_link_or_button 'Remove deleteCandidate status'
@domain.reload
refute @domain.discarded?
assert_text 'deleteCandidate status has been removed'
assert_no_link 'Remove deleteCandidate status'
end
end