mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Merge branch 'master' of github.com:domify/registry
This commit is contained in:
commit
beaf8fc7b6
27 changed files with 257 additions and 87 deletions
|
@ -46,7 +46,7 @@ feature 'BankStatement', type: :feature do
|
|||
|
||||
click_link 'Back to bank statement'
|
||||
|
||||
page.should have_content('120.0')
|
||||
page.should have_content('120,00')
|
||||
page.should have_content('Test buyer')
|
||||
end
|
||||
end
|
||||
|
|
|
@ -37,7 +37,7 @@ feature 'Invoice', type: :feature do
|
|||
page.should have_content('Record created')
|
||||
page.should have_content('Invoice no.')
|
||||
page.should have_content('Prepayment')
|
||||
page.should have_content('120.0')
|
||||
page.should have_content('120,00')
|
||||
page.should have_content(r.name)
|
||||
end
|
||||
|
||||
|
@ -107,7 +107,7 @@ feature 'Invoice', type: :feature do
|
|||
page.should have_content('689')
|
||||
page.should have_content('EE557700771000598731')
|
||||
page.should have_content('Not binded', count: 2)
|
||||
page.should have_content(invoice.sum.to_s)
|
||||
page.should have_content('240,00')
|
||||
page.should have_content('EUR')
|
||||
|
||||
click_link 'Bind invoices'
|
||||
|
@ -120,7 +120,7 @@ feature 'Invoice', type: :feature do
|
|||
|
||||
page.should have_content('Binded')
|
||||
page.should have_content(invoice.to_s)
|
||||
page.should have_content(invoice.sum.to_s)
|
||||
page.should have_content('240,00')
|
||||
page.should have_content(invoice.reference_no)
|
||||
page.should have_content(I18n.l(paid_at, format: :date_long))
|
||||
|
||||
|
|
39
spec/models/deposit_spec.rb
Normal file
39
spec/models/deposit_spec.rb
Normal file
|
@ -0,0 +1,39 @@
|
|||
require 'rails_helper'
|
||||
|
||||
describe Deposit do
|
||||
context 'with invalid attribute' do
|
||||
before :all do
|
||||
@deposit = Deposit.new
|
||||
end
|
||||
|
||||
it 'should not be valid' do
|
||||
@deposit.valid?
|
||||
@deposit.errors.full_messages.should match_array([
|
||||
"Registrar is missing"
|
||||
])
|
||||
end
|
||||
|
||||
it 'should have 0 amount' do
|
||||
@deposit.amount.should == 0
|
||||
end
|
||||
|
||||
it 'should not be presisted' do
|
||||
@deposit.persisted?.should == false
|
||||
end
|
||||
|
||||
it 'should replace comma with point for 0' do
|
||||
@deposit.amount = '0,0'
|
||||
@deposit.amount.should == 0.0
|
||||
end
|
||||
|
||||
it 'should replace comma with points' do
|
||||
@deposit.amount = '10,11'
|
||||
@deposit.amount.should == 10.11
|
||||
end
|
||||
|
||||
it 'should work with float as well' do
|
||||
@deposit.amount = 0.123
|
||||
@deposit.amount.should == 0.123
|
||||
end
|
||||
end
|
||||
end
|
|
@ -239,7 +239,7 @@ describe Domain do
|
|||
DomainStatus::CLIENT_HOLD,
|
||||
DomainStatus::EXPIRED,
|
||||
DomainStatus::SERVER_HOLD,
|
||||
DomainStatus::DELETE_CANDIDATE,
|
||||
DomainStatus::DELETE_CANDIDATE
|
||||
]
|
||||
|
||||
@domain.save
|
||||
|
|
|
@ -41,7 +41,9 @@ describe ZonefileSetting do
|
|||
|
||||
it 'should not place serverHold nor clientHold domains into zonefile' do
|
||||
Fabricate(:zonefile_setting)
|
||||
d = Fabricate(:domain_with_dnskeys, name: 'testzone.ee', statuses: ['serverHold', 'serverDeleteProhibited', 'clientHold'])
|
||||
d = Fabricate(:domain_with_dnskeys,
|
||||
name: 'testzone.ee',
|
||||
statuses: ['serverHold', 'serverDeleteProhibited', 'clientHold'])
|
||||
d.nameservers << Nameserver.new({
|
||||
hostname: "ns.#{d.name}",
|
||||
ipv4: '123.123.123.123',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue