require 'test_helper' class EppDomainUpdateTest < ActionDispatch::IntegrationTest def setup login_as users(:api_bestnames) end def test_overwrites_existing request_xml = <<-XML shop.test f0ff7d17b0 XML session_id = epp_sessions(:api_bestnames).session_id post '/epp/command/update', { frame: request_xml }, { 'HTTP_COOKIE' => "session=#{session_id}" } assert_equal 'f0ff7d17b0', domains(:shop).transfer_code end end