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 domain_create_with_invalid_ns_ip_xml
    xml_params = {
      name: { value: next_domain_name },
      period: { value: '1', attrs: { unit: 'y' } },
      ns: [
        {
          hostAttr: {
            hostName: { value: 'ns1.example.net' },
            hostAddr: { value: '192.0.2.2.invalid', attrs: { ip: 'v4' } }
          }
        },
        {
          hostAttr: {
            hostName: { value: 'ns2.example.net' },
            hostAddr: { value: 'invalid_ipv6', attrs: { ip: 'v6' } }
          }
        }
      ],
      registrant: { value: 'FIXED:CITIZEN_1234' },
      _anonymus: [
        { contact: { value: 'FIXED:SH8013', attrs: { type: 'admin' } } },
        { contact: { value: 'FIXED:SH8013', attrs: { type: 'tech' } } },
        { contact: { value: 'FIXED:SH801333', attrs: { type: 'tech' } } }
      ],
      authInfo: {
        pw: {
          value: '2fooBAR'
        }
      }
    }
    custom_params = {
      _anonymus: [
        legalDocument: {
          value: 'dGVzdCBmYWlsCg==',
          attrs: { type: 'pdf' }
        }
      ]
    }
    epp_xml = EppXml::Domain.new(cl_trid: 'ABC-12345')
    epp_xml.create(xml_params, {}, custom_params)
  end
def domain_create_with_invalid_ns_ip_xml xml_params = { name : { value : next_domain_name } , period : { value : '1' , attrs : { unit : 'y' } } , ns : [ { hostAttr : { hostName : { value : 'ns1.example.net' } , hostAddr : { value : '192.0.2.2.invalid' , attrs : { ip : 'v4' } } } } , { hostAttr : { hostName : { value : 'ns2.example.net' } , hostAddr : { value : 'invalid_ipv6' , attrs : { ip : 'v6' } } } } ] , registrant : { value : 'FIXED:CITIZEN_1234' } , _anonymus : [ { contact : { value : 'FIXED:SH8013' , attrs : { type : 'admin' } } } , { contact : { value : 'FIXED:SH8013' , attrs : { type : 'tech' } } } , { contact : { value : 'FIXED:SH801333' , attrs : { type : 'tech' } } } ] , authInfo : { pw : { value : '2fooBAR' } } } custom_params = { _anonymus : [ legalDocument : { value : 'dGVzdCBmYWlsCg==' , attrs : { type : 'pdf' } } ] } epp_xml = EppXml :: Domain . new ( cl_trid : 'ABC-12345' ) epp_xml . create ( xml_params , { } , custom_params ) end
Example usage:
login_as :gitlab
Example usage : login_as : gitlab