spec/support/epp.rb
# Example usage:
#
#    login_as :gitlab
#
# Use block for temp login:
#
#    login_as :registrar1 do
#      your test code
#      # will make request as registrar1 and logins back to previous session
#    end
#
Example usage:
login_as :gitlab

Use block for temp login.

login_as :registrar1 do
your test code
will make request as registrar1 and logins back to previous session
end
Example usage : login_as : gitlab Use block for temp login . login_as : registrar1 do your test code will make request as registrar1 and logins back to previous session end
def login_xml_for(user)
    @xml ||= EppXml.new(cl_trid: 'ABC-12345')
    case user
    when :gitlab
      @gitlab_login_xml ||=
        @xml.session.login(clID: { value: 'gitlab' }, pw: { value: 'ghyt9e4fu' })
    when :registrar1
      @registrar1_login_xml ||=
        @xml.session.login(clID: { value: 'registrar1' }, pw: { value: 'ghyt9e4fu' })
    when :registrar2
      @registrar2_login_xml ||=
        @xml.session.login(clID: { value: 'registrar2' }, pw: { value: 'ghyt9e4fu' })
    end
  end
def login_xml_for ( user ) @xml ||= EppXml . new ( cl_trid : 'ABC-12345' ) case user when :gitlab @gitlab_login_xml ||= @xml . session . login ( clID : { value : 'gitlab' } , pw : { value : 'ghyt9e4fu' } ) when :registrar1 @registrar1_login_xml ||= @xml . session . login ( clID : { value : 'registrar1' } , pw : { value : 'ghyt9e4fu' } ) when :registrar2 @registrar2_login_xml ||= @xml . session . login ( clID : { value : 'registrar2' } , pw : { value : 'ghyt9e4fu' } ) end end
Example usage:
login_as :gitlab
Example usage : login_as : gitlab
user
<not_specific>