require 'test_helper' class EppDomainUpdateTest < ActionDispatch::IntegrationTest def test_overwrites_existing 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 end