Updated spec and rails helper

This commit is contained in:
Priit Tark 2015-01-27 11:26:21 +02:00
parent 221c62c846
commit 155cb812d9
5 changed files with 32 additions and 28 deletions

View file

@ -2,9 +2,6 @@ require 'rails_helper'
describe 'EPP Contact', epp: true do
before :all do
DatabaseCleaner.clean_with(:truncation)
DatabaseCleaner.strategy = nil
Fabricate(:epp_user)
Fabricate(:epp_user, username: 'registrar1', registrar: registrar1)
Fabricate(:epp_user, username: 'registrar2', registrar: registrar2)
@ -82,11 +79,9 @@ describe 'EPP Contact', epp: true do
log.length.should == 1
log[0].request_command.should == 'create'
log[0].request_object.should == 'contact'
log[0].request_successful.should == 'true'
log[0].api_user_name.should == 'registrar1'
log[0].request_successful.should == true
log[0].api_user_name.should == 'gitlab'
log[0].api_user_registrar.should == 'Registrar OÜ'
log[0].request.should be_blank
log[0].response.should be_blank
end
it 'successfully adds registrar' do

View file

@ -1,6 +1,5 @@
require 'rails_helper'
describe 'EPP Keyrelay', epp: true do
let(:server_zone) { Epp::Server.new({ server: 'localhost', tag: 'zone', password: 'ghyt9e4fu', port: 701 }) }
let(:server_elkdata) { Epp::Server.new({ server: 'localhost', tag: 'elkdata', password: 'ghyt9e4fu', port: 701 }) }
@ -9,8 +8,6 @@ describe 'EPP Keyrelay', epp: true do
before(:each) { create_settings }
before(:all) do
DatabaseCleaner.clean_with(:truncation)
DatabaseCleaner.strategy = nil
@elkdata = Fabricate(:registrar, { name: 'Elkdata', reg_no: '123' })
@zone = Fabricate(:registrar)
Fabricate(:epp_user, username: 'zone', registrar: @zone)

View file

@ -17,6 +17,7 @@ describe 'EPP Poll', epp: true do
end
it 'returns no messages in poll' do
ApiLog::EppLog.delete_all
response = epp_request(epp_xml.poll, :xml)
expect(response[:msg]).to eq('Command completed successfully; no messages')