mirror of
https://github.com/internetee/registry.git
synced 2025-07-25 20:18:22 +02:00
Fix some tests #2741
This commit is contained in:
parent
61dfe6e1f3
commit
36e4f2ddc9
3 changed files with 13 additions and 2 deletions
|
@ -131,6 +131,14 @@ class Registrar < ActiveRecord::Base
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def credit!(sum, description)
|
||||||
|
cash_account.account_activities.create!(
|
||||||
|
sum: sum,
|
||||||
|
currency: 'EUR',
|
||||||
|
description: description
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
def domain_transfers
|
def domain_transfers
|
||||||
at = DomainTransfer.arel_table
|
at = DomainTransfer.arel_table
|
||||||
DomainTransfer.where(
|
DomainTransfer.where(
|
||||||
|
|
|
@ -5,7 +5,9 @@ describe 'EPP Domain', epp: true do
|
||||||
@xsd = Nokogiri::XML::Schema(File.read('doc/schemas/domain-eis-1.0.xsd'))
|
@xsd = Nokogiri::XML::Schema(File.read('doc/schemas/domain-eis-1.0.xsd'))
|
||||||
@epp_xml = EppXml.new(cl_trid: 'ABC-12345')
|
@epp_xml = EppXml.new(cl_trid: 'ABC-12345')
|
||||||
@registrar1 = Fabricate(:registrar1, code: 'REGDOMAIN1')
|
@registrar1 = Fabricate(:registrar1, code: 'REGDOMAIN1')
|
||||||
|
@registrar1.credit!(10000, '')
|
||||||
@registrar2 = Fabricate(:registrar2, code: 'REGDOMAIN2')
|
@registrar2 = Fabricate(:registrar2, code: 'REGDOMAIN2')
|
||||||
|
@registrar2.credit!(10000, '')
|
||||||
Fabricate(:api_user, username: 'registrar1', registrar: @registrar1)
|
Fabricate(:api_user, username: 'registrar1', registrar: @registrar1)
|
||||||
Fabricate(:api_user, username: 'registrar2', registrar: @registrar2)
|
Fabricate(:api_user, username: 'registrar2', registrar: @registrar2)
|
||||||
|
|
||||||
|
@ -17,6 +19,7 @@ describe 'EPP Domain', epp: true do
|
||||||
Fabricate(:contact, code: 'FIXED:JURIDICAL_1234', ident_type: 'bic')
|
Fabricate(:contact, code: 'FIXED:JURIDICAL_1234', ident_type: 'bic')
|
||||||
Fabricate(:reserved_domain)
|
Fabricate(:reserved_domain)
|
||||||
Fabricate(:blocked_domain)
|
Fabricate(:blocked_domain)
|
||||||
|
Fabricate(:pricelist)
|
||||||
|
|
||||||
@uniq_no = proc { @i ||= 0; @i += 1 }
|
@uniq_no = proc { @i ||= 0; @i += 1 }
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
Fabricator(:pricelist) do
|
Fabricator(:pricelist) do
|
||||||
valid_from 1.year.ago
|
valid_from 1.year.ago
|
||||||
valid_to 1.year.since
|
valid_to 1.year.since
|
||||||
category '.ee'
|
category 'ee'
|
||||||
duration '1year'
|
duration '1year'
|
||||||
operation_category 'new'
|
operation_category 'create'
|
||||||
price 10
|
price 10
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue