diff --git a/test/integration/epp/domain/domain_delete_test.rb b/test/integration/epp/domain/delete/base_test.rb similarity index 88% rename from test/integration/epp/domain/domain_delete_test.rb rename to test/integration/epp/domain/delete/base_test.rb index da811da1ac..3b5ef5032d 100644 --- a/test/integration/epp/domain/domain_delete_test.rb +++ b/test/integration/epp/domain/delete/base_test.rb @@ -1,11 +1,13 @@ require 'test_helper' -class EppDomainDeleteTest < ApplicationIntegrationTest +class EppDomainDeleteBaseTest < ActionDispatch::IntegrationTest def setup @domain = domains(:shop) end def test_bypasses_domain_and_registrant_and_contacts_validation + assert_equal 'invalid.test', domains(:invalid).name + request_xml = <<-XML @@ -24,13 +26,14 @@ def test_bypasses_domain_and_registrant_and_contacts_validation XML - post '/epp/command/delete', { frame: request_xml }, { 'HTTP_COOKIE' => 'session=api_bestnames' } + post '/epp/command/delete', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames' assert_includes Domain.find_by(name: 'invalid.test').statuses, DomainStatus::PENDING_DELETE_CONFIRMATION assert_equal '1001', Nokogiri::XML(response.body).at_css('result')[:code] assert_equal 1, Nokogiri::XML(response.body).css('result').size end def test_discarded_domain_cannot_be_deleted + assert_equal 'shop.test', @domain.name @domain.update!(statuses: [DomainStatus::DELETE_CANDIDATE]) request_xml = <<-XML @@ -55,6 +58,5 @@ def test_discarded_domain_cannot_be_deleted post '/epp/command/delete', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames' end assert_equal '2105', Nokogiri::XML(response.body).at_css('result')[:code] - travel_back end -end +end \ No newline at end of file