require 'test_helper' class EppLoginPasswordChangeTest < ActionDispatch::IntegrationTest def test_password_change request_xml = <<-XML test_bestnames testtest new-password 1.0 en https://epp.tld.ee/schema/domain-eis-1.0.xsd https://epp.tld.ee/schema/contact-ee-1.1.xsd urn:ietf:params:xml:ns:host-1.0 urn:ietf:params:xml:ns:keyrelay-1.0 XML post '/epp/session/login', { frame: request_xml }, { 'HTTP_COOKIE' => 'session=new_session_id' } assert_equal 'new-password', users(:api_bestnames).plain_text_password assert_equal '1000', Nokogiri::XML(response.body).at_css('result')[:code] assert_equal 1, Nokogiri::XML(response.body).css('result').size end end