mirror of
https://github.com/internetee/registry.git
synced 2025-06-11 23:24:48 +02:00
Merge branch 'master' of https://github.com/internetee/registry into 1857-covered-registry-by-tests
This commit is contained in:
commit
853e4c447b
54 changed files with 19 additions and 1803 deletions
|
@ -1,19 +0,0 @@
|
|||
require 'test_helper'
|
||||
|
||||
class RegistrantAreaContactsIntegrationTest < ApplicationIntegrationTest
|
||||
setup do
|
||||
@domain = domains(:shop)
|
||||
@registrant = users(:registrant)
|
||||
sign_in @registrant
|
||||
end
|
||||
|
||||
def test_can_view_other_domain_contacts
|
||||
secondary_contact = contacts(:jane)
|
||||
|
||||
visit registrant_domain_path(@domain)
|
||||
assert_text secondary_contact.name
|
||||
click_link secondary_contact.name
|
||||
assert_text @domain.name
|
||||
assert_text secondary_contact.email
|
||||
end
|
||||
end
|
|
@ -1,30 +0,0 @@
|
|||
require 'test_helper'
|
||||
|
||||
class RegistrantAreaDomainDeleteConfirmationIntegrationTest < ActionDispatch::IntegrationTest
|
||||
include ActionMailer::TestHelper
|
||||
|
||||
setup do
|
||||
@domain = domains(:shop)
|
||||
ActionMailer::Base.deliveries.clear
|
||||
end
|
||||
|
||||
def test_notifies_registrant_by_email_when_accepted
|
||||
@domain.update!(registrant_verification_asked_at: Time.zone.now,
|
||||
registrant_verification_token: 'test',
|
||||
statuses: [DomainStatus::PENDING_DELETE_CONFIRMATION])
|
||||
|
||||
patch registrant_domain_delete_confirm_path(@domain, token: 'test', confirmed: true)
|
||||
|
||||
assert_emails 1
|
||||
end
|
||||
|
||||
def test_notifies_registrant_by_email_when_rejected
|
||||
@domain.update!(registrant_verification_asked_at: Time.zone.now,
|
||||
registrant_verification_token: 'test',
|
||||
statuses: [DomainStatus::PENDING_DELETE_CONFIRMATION])
|
||||
|
||||
patch registrant_domain_delete_confirm_path(@domain, token: 'test', rejected: true)
|
||||
|
||||
assert_emails 1
|
||||
end
|
||||
end
|
|
@ -1,25 +0,0 @@
|
|||
require 'test_helper'
|
||||
|
||||
class RegistrantAreaDomainsIntegrationTest < ApplicationIntegrationTest
|
||||
setup do
|
||||
sign_in users(:registrant)
|
||||
end
|
||||
|
||||
def test_downloads_list_as_csv
|
||||
get registrant_domains_path(format: :csv)
|
||||
|
||||
assert_response :ok
|
||||
assert_equal "#{Mime[:csv]}; charset=utf-8", response.headers['Content-Type']
|
||||
assert_equal "attachment; filename=\"domains.csv\"; filename*=UTF-8''domains.csv", response.headers['Content-Disposition']
|
||||
assert_not_empty response.body
|
||||
end
|
||||
|
||||
def test_downloads_list_as_pdf
|
||||
get registrant_domains_path(format: :pdf)
|
||||
|
||||
assert_response :ok
|
||||
assert_equal Mime[:pdf], response.headers['Content-Type']
|
||||
assert_equal "attachment; filename=\"domains.pdf\"; filename*=UTF-8''domains.pdf", response.headers['Content-Disposition']
|
||||
assert_not_empty response.body
|
||||
end
|
||||
end
|
|
@ -21,7 +21,7 @@ class ReppV1RetainedDomainsTest < ActionDispatch::IntegrationTest
|
|||
status: 'reserved',
|
||||
punycode_name: 'reserved.test' }]
|
||||
|
||||
assert_equal response_json[:domains], expected_objects
|
||||
assert_empty response_json[:domains] - expected_objects
|
||||
end
|
||||
|
||||
def test_get_index_with_type_parameter
|
||||
|
@ -77,7 +77,7 @@ class ReppV1RetainedDomainsTest < ActionDispatch::IntegrationTest
|
|||
status: 'disputed',
|
||||
punycode_name: 'reserved.test' }]
|
||||
|
||||
assert_equal response_json[:domains], expected_objects
|
||||
assert_empty response_json[:domains] - expected_objects
|
||||
end
|
||||
|
||||
def test_etags_cache
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue