require 'test_helper' class EppDomainUpdateTest < ActionDispatch::IntegrationTest def test_update_domain request_xml = <<-XML shop.test f0ff7d17b0 XML post '/epp/command/update', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames' assert_equal 'f0ff7d17b0', domains(:shop).transfer_code assert_equal '1000', 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_updated domains(:shop).discard request_xml = <<-XML shop.test XML post '/epp/command/update', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames' assert_equal '2105', Nokogiri::XML(response.body).at_css('result')[:code] end end