mirror of
https://github.com/internetee/registry.git
synced 2025-06-12 15:44:45 +02:00
Story#110308584 - update tests of registrar
This commit is contained in:
parent
352159a4c0
commit
04aaa14db9
2 changed files with 5 additions and 1 deletions
|
@ -113,7 +113,7 @@ class Invoice < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def description
|
def description
|
||||||
"Order nr. #{number}"
|
read_attribute(__method__).presence || "Order nr. #{number}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def pdf_name
|
def pdf_name
|
||||||
|
|
|
@ -130,6 +130,10 @@ describe Registrar do
|
||||||
i.sum.should == BigDecimal.new('240.0')
|
i.sum.should == BigDecimal.new('240.0')
|
||||||
i.due_date.should be_within(0.1).of((Time.zone.now + 30.days).end_of_day)
|
i.due_date.should be_within(0.1).of((Time.zone.now + 30.days).end_of_day)
|
||||||
i.description.should == 'add some money'
|
i.description.should == 'add some money'
|
||||||
|
|
||||||
|
@registrar.issue_prepayment_invoice(200)
|
||||||
|
i = @registrar.invoices.last
|
||||||
|
i.description.should start_with "Order nr."
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should not allaw to use CID as code for leagcy reasons' do
|
it 'should not allaw to use CID as code for leagcy reasons' do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue