mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 08:52:04 +02:00
Merge pull request #1814 from internetee/add-guard-clause-to-mass-nameserver-change
Bulk NS change: Verify CSV integrity
This commit is contained in:
commit
22351c9053
12 changed files with 180 additions and 61 deletions
|
@ -94,4 +94,25 @@ class RegistrarAreaNameserverBulkChangeTest < ApplicationSystemTestCase
|
|||
assert_text 'Nameserver have been successfully replaced'
|
||||
assert_text 'Affected domains: shop.test'
|
||||
end
|
||||
|
||||
def test_replaces_nameservers_with_invalid_domains_list
|
||||
nameserver = nameservers(:shop_ns1)
|
||||
|
||||
visit registrar_domains_url
|
||||
click_link 'Bulk change'
|
||||
click_link 'Nameserver'
|
||||
|
||||
fill_in 'Old hostname', with: nameserver.hostname
|
||||
fill_in 'New hostname', with: 'new-ns.bestnames.test'
|
||||
fill_in 'ipv4', with: "192.0.2.55\n192.0.2.56"
|
||||
fill_in 'ipv6', with: "2001:db8::55\n2001:db8::56"
|
||||
attach_file :puny_file, Rails.root.join('test', 'fixtures', 'files', 'invalid_domains_for_ns_replacement.csv').to_s
|
||||
|
||||
assert_no_changes -> { nameserver.hostname } do
|
||||
click_on 'Replace nameserver'
|
||||
end
|
||||
|
||||
assert_current_path registrar_domains_path
|
||||
assert_text 'CSV scoped domain list seems empty. Make sure that domains are added and "domain_name" header is present.'
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue