mirror of
https://github.com/internetee/registry.git
synced 2025-08-02 16:02:03 +02:00
Merge branch 'master' into log-bounced-emails
This commit is contained in:
commit
4adc240b0b
141 changed files with 3748 additions and 1214 deletions
|
@ -42,6 +42,38 @@ class AdminAreaDomainForceDeleteTest < ApplicationSystemTestCase
|
|||
find(:css, '#soft_delete').set(true)
|
||||
click_link_or_button 'Force delete domain'
|
||||
end
|
||||
|
||||
@domain.reload
|
||||
assert_equal @domain.notification_template, @domain.template_name
|
||||
end
|
||||
|
||||
def test_uses_legal_template_if_registrant_org
|
||||
@domain.registrant.update(ident_type: 'org')
|
||||
|
||||
assert_emails 0 do
|
||||
visit edit_admin_domain_url(@domain)
|
||||
find(:css, '#soft_delete').set(true)
|
||||
click_link_or_button 'Force delete domain'
|
||||
end
|
||||
|
||||
@domain.reload
|
||||
assert_equal @domain.notification_template, @domain.template_name
|
||||
end
|
||||
|
||||
def test_uses_legal_template_if_invalid_email
|
||||
verification = @domain.contacts.first.email_verification
|
||||
verification.update(verified_at: Time.zone.now - 1.day, success: false)
|
||||
|
||||
assert_equal @domain.notification_template, 'invalid_email'
|
||||
|
||||
assert_emails 0 do
|
||||
visit edit_admin_domain_url(@domain)
|
||||
find(:css, '#soft_delete').set(true)
|
||||
click_link_or_button 'Force delete domain'
|
||||
end
|
||||
|
||||
@domain.reload
|
||||
assert_equal @domain.notification_template, @domain.template_name
|
||||
end
|
||||
|
||||
def test_allows_to_skip_notifying_registrant_and_admin_contacts_by_email
|
||||
|
|
|
@ -29,6 +29,16 @@ class RegistrarAreaBaseTestTest < ApplicationSystemTestCase
|
|||
assert_button 'Login'
|
||||
end
|
||||
|
||||
def test_user_can_access_when_ip_is_whitelisted_with_subnet
|
||||
white_ips(:one).update!(ipv4: '127.0.0.1/32', interfaces: [WhiteIp::REGISTRAR])
|
||||
Setting.registrar_ip_whitelist_enabled = true
|
||||
|
||||
visit new_registrar_user_session_url
|
||||
|
||||
assert_no_text 'Access denied from IP 127.0.0.1'
|
||||
assert_button 'Login'
|
||||
end
|
||||
|
||||
def test_user_can_access_when_ip_is_not_whitelisted_and_whitelist_is_disabled
|
||||
Setting.registrar_ip_whitelist_enabled = false
|
||||
WhiteIp.delete_all
|
||||
|
|
|
@ -6,9 +6,9 @@ class RegistrarAreaBulkTransferTest < ApplicationSystemTestCase
|
|||
end
|
||||
|
||||
def test_transfer_multiple_domains_in_bulk
|
||||
request_body = { data: { domainTransfers: [{ domainName: 'shop.test', transferCode: '65078d5' }] } }
|
||||
request_body = { data: { domain_transfers: [{ domain_name: 'shop.test', transfer_code: '65078d5' }] } }
|
||||
headers = { 'Content-type' => Mime[:json] }
|
||||
request_stub = stub_request(:post, /domain_transfers/).with(body: request_body,
|
||||
request_stub = stub_request(:post, /domains\/transfer/).with(body: request_body,
|
||||
headers: headers,
|
||||
basic_auth: ['test_goodnames', 'testtest'])
|
||||
.to_return(body: { data: [{
|
||||
|
@ -29,7 +29,7 @@ class RegistrarAreaBulkTransferTest < ApplicationSystemTestCase
|
|||
def test_fail_gracefully
|
||||
body = { errors: [{ title: 'epic fail' }] }.to_json
|
||||
headers = { 'Content-type' => Mime[:json] }
|
||||
stub_request(:post, /domain_transfers/).to_return(status: 400, body: body, headers: headers)
|
||||
stub_request(:post, /domains\/transfer/).to_return(status: 400, body: body, headers: headers)
|
||||
|
||||
visit registrar_domains_url
|
||||
click_link 'Bulk change'
|
||||
|
|
|
@ -8,6 +8,7 @@ class RegistrarAreaNameserverBulkChangeTest < ApplicationSystemTestCase
|
|||
def test_replaces_current_registrar_nameservers
|
||||
request_body = { data: { type: 'nameserver',
|
||||
id: 'ns1.bestnames.test',
|
||||
domains: [],
|
||||
attributes: { hostname: 'new-ns.bestnames.test',
|
||||
ipv4: %w[192.0.2.55 192.0.2.56],
|
||||
ipv6: %w[2001:db8::55 2001:db8::56] } } }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue