This commit is contained in:
Martin Lensment 2015-07-23 12:21:53 +03:00
parent c79fee5a49
commit 2148cc57e5
16 changed files with 935 additions and 24 deletions

View file

@ -2,7 +2,7 @@ require 'rails_helper'
describe 'EPP Contact', epp: true do
before :all do
@xsd = Nokogiri::XML::Schema(File.read('doc/schemas/contact-eis-1.0.xsd'))
@xsd = Nokogiri::XML::Schema(File.read('lib/schemas/contact-eis-1.0.xsd'))
@registrar1 = Fabricate(:registrar1)
@registrar2 = Fabricate(:registrar2)
@epp_xml = EppXml::Contact.new(cl_trid: 'ABC-12345')

View file

@ -2,7 +2,7 @@ require 'rails_helper'
describe 'EPP Domain', epp: true do
before(:all) do
@xsd = Nokogiri::XML::Schema(File.read('doc/schemas/domain-eis-1.0.xsd'))
@xsd = Nokogiri::XML::Schema(File.read('lib/schemas/domain-eis-1.0.xsd'))
@epp_xml = EppXml.new(cl_trid: 'ABC-12345')
@registrar1 = Fabricate(:registrar1, code: 'REGDOMAIN1')
@registrar1.credit!({ sum: 10000 })

View file

@ -12,7 +12,7 @@ describe 'EPP Poll', epp: true do
end
before(:all) do
@xsd = Nokogiri::XML::Schema(File.read('doc/schemas/epp-1.0.xsd'))
@xsd = Nokogiri::XML::Schema(File.read('lib/schemas/epp-1.0.xsd'))
Fabricate(:api_user, username: 'registrar1', registrar: registrar1)
Fabricate(:api_user, username: 'registrar2', registrar: registrar2)

View file

@ -5,7 +5,7 @@ describe 'EPP Session', epp: true do
@api_user = Fabricate(:gitlab_api_user)
@epp_xml = EppXml.new(cl_trid: 'ABC-12345')
@login_xml_cache = @epp_xml.session.login(clID: { value: 'gitlab' }, pw: { value: 'ghyt9e4fu' })
@xsd = Nokogiri::XML::Schema(File.read('doc/schemas/epp-1.0.xsd'))
@xsd = Nokogiri::XML::Schema(File.read('lib/schemas/epp-1.0.xsd'))
end
context 'when not connected' do
@ -51,7 +51,7 @@ describe 'EPP Session', epp: true do
end
it 'prohibits further actions unless logged in' do
@xsd = Nokogiri::XML::Schema(File.read('doc/schemas/domain-eis-1.0.xsd'))
@xsd = Nokogiri::XML::Schema(File.read('lib/schemas/domain-eis-1.0.xsd'))
response = epp_plain_request(@epp_xml.domain.info(name: { value: 'test.ee' }))
response[:msg].should == 'You need to login first.'
response[:result_code].should == '2002'