mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 19:48:28 +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
|
||||
|
||||
def credit!(sum, description)
|
||||
cash_account.account_activities.create!(
|
||||
sum: sum,
|
||||
currency: 'EUR',
|
||||
description: description
|
||||
)
|
||||
end
|
||||
|
||||
def domain_transfers
|
||||
at = DomainTransfer.arel_table
|
||||
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'))
|
||||
@epp_xml = EppXml.new(cl_trid: 'ABC-12345')
|
||||
@registrar1 = Fabricate(:registrar1, code: 'REGDOMAIN1')
|
||||
@registrar1.credit!(10000, '')
|
||||
@registrar2 = Fabricate(:registrar2, code: 'REGDOMAIN2')
|
||||
@registrar2.credit!(10000, '')
|
||||
Fabricate(:api_user, username: 'registrar1', registrar: @registrar1)
|
||||
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(:reserved_domain)
|
||||
Fabricate(:blocked_domain)
|
||||
Fabricate(:pricelist)
|
||||
|
||||
@uniq_no = proc { @i ||= 0; @i += 1 }
|
||||
end
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
Fabricator(:pricelist) do
|
||||
valid_from 1.year.ago
|
||||
valid_to 1.year.since
|
||||
category '.ee'
|
||||
category 'ee'
|
||||
duration '1year'
|
||||
operation_category 'new'
|
||||
operation_category 'create'
|
||||
price 10
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue