mirror of
https://github.com/internetee/registry.git
synced 2025-06-11 23:24:48 +02:00
parent
60a66942d1
commit
3e94c10da1
8 changed files with 105 additions and 31 deletions
|
@ -1,13 +1,31 @@
|
|||
require 'test_helper'
|
||||
|
||||
class AdminDomainsTestTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
def setup
|
||||
login_as users(:admin)
|
||||
@domain = domains(:shop)
|
||||
end
|
||||
|
||||
def teardown
|
||||
travel_back
|
||||
end
|
||||
|
||||
def test_shows_details
|
||||
domain = domains(:shop)
|
||||
visit admin_domain_path(domain)
|
||||
assert_field nil, with: domain.transfer_code
|
||||
visit admin_domain_path(@domain)
|
||||
assert_field nil, with: @domain.transfer_code
|
||||
end
|
||||
|
||||
def test_keep_a_domain
|
||||
travel_to Time.zone.parse('2010-07-05 10:30')
|
||||
@domain.delete_at = Time.zone.parse('2010-07-05 10:00')
|
||||
@domain.discard
|
||||
|
||||
visit edit_admin_domain_url(@domain)
|
||||
click_link_or_button 'Remove deleteCandidate status'
|
||||
@domain.reload
|
||||
|
||||
assert_not @domain.discarded?
|
||||
assert_text 'deleteCandidate status has been removed'
|
||||
assert_no_link 'Remove deleteCandidate status'
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue