mirror of
https://github.com/internetee/registry.git
synced 2025-07-02 01:03:35 +02:00
Remove redundant lines
This commit is contained in:
parent
4c1736a1c7
commit
418695ccc7
1 changed files with 2 additions and 18 deletions
|
@ -1,27 +1,13 @@
|
||||||
require 'rails_helper'
|
require 'rails_helper'
|
||||||
|
|
||||||
describe 'EPP Domain', epp: true do
|
describe 'EPP Domain', epp: true do
|
||||||
|
|
||||||
before do
|
|
||||||
# we don't really care about the code validations here, it's done in models
|
|
||||||
# dynamic Contact.code just makes it harder to test EPP
|
|
||||||
Contact.skip_callback(:create, :before, :generate_code)
|
|
||||||
end
|
|
||||||
|
|
||||||
after do
|
|
||||||
Contact.set_callback(:create, :before, :generate_code)
|
|
||||||
end
|
|
||||||
|
|
||||||
let(:server_zone) { Epp::Server.new({ server: 'localhost', tag: 'zone', password: 'ghyt9e4fu', port: 701 }) }
|
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 }) }
|
let(:server_elkdata) { Epp::Server.new({ server: 'localhost', tag: 'elkdata', password: 'ghyt9e4fu', port: 701 }) }
|
||||||
let(:elkdata) { Fabricate(:registrar, { name: 'Elkdata', reg_no: '123' }) }
|
|
||||||
let(:zone) { Fabricate(:registrar) }
|
|
||||||
let(:epp_xml) { EppXml.new(cl_trid: 'ABC-12345') }
|
let(:epp_xml) { EppXml.new(cl_trid: 'ABC-12345') }
|
||||||
|
|
||||||
before(:each) { create_settings }
|
before(:each) { create_settings }
|
||||||
|
|
||||||
before(:all) do
|
before(:all) do
|
||||||
|
|
||||||
@elkdata = Fabricate(:registrar, { name: 'Elkdata', reg_no: '123' })
|
@elkdata = Fabricate(:registrar, { name: 'Elkdata', reg_no: '123' })
|
||||||
@zone = Fabricate(:registrar)
|
@zone = Fabricate(:registrar)
|
||||||
Fabricate(:epp_user, username: 'zone', registrar: @zone)
|
Fabricate(:epp_user, username: 'zone', registrar: @zone)
|
||||||
|
@ -29,15 +15,13 @@ describe 'EPP Domain', epp: true do
|
||||||
|
|
||||||
Contact.skip_callback(:create, :before, :generate_code)
|
Contact.skip_callback(:create, :before, :generate_code)
|
||||||
|
|
||||||
@example_ee = Fabricate(:domain, name: 'example.ee', registrar: @zone, dnskeys: [])
|
|
||||||
|
|
||||||
Fabricate(:contact, code: 'citizen_1234')
|
Fabricate(:contact, code: 'citizen_1234')
|
||||||
Fabricate(:contact, code: 'sh8013')
|
Fabricate(:contact, code: 'sh8013')
|
||||||
Fabricate(:contact, code: 'sh801333')
|
Fabricate(:contact, code: 'sh801333')
|
||||||
@juridical_contact = Fabricate(:contact, code: 'juridical_1234', ident_type: 'ico')
|
Fabricate(:contact, code: 'juridical_1234', ident_type: 'ico')
|
||||||
Fabricate(:reserved_domain)
|
Fabricate(:reserved_domain)
|
||||||
|
|
||||||
@uniq_no = Proc.new { @i ||= 0; @i += 1 }
|
@uniq_no = proc { @i ||= 0; @i += 1 }
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'returns error if contact does not exists' do
|
it 'returns error if contact does not exists' do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue