From 7a6ec737f17dac3b19aa3884a2c9273329cd4877 Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Thu, 18 Apr 2019 12:40:04 +0300 Subject: [PATCH] Move tests --- .../{domain_delete_test.rb => delete/base_test.rb} | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) rename test/integration/epp/domain/{domain_delete_test.rb => delete/base_test.rb} (88%) 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