mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 14:44:47 +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
|
||||
|
||||
def description
|
||||
"Order nr. #{number}"
|
||||
read_attribute(__method__).presence || "Order nr. #{number}"
|
||||
end
|
||||
|
||||
def pdf_name
|
||||
|
|
|
@ -130,6 +130,10 @@ describe Registrar do
|
|||
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.description.should == 'add some money'
|
||||
|
||||
@registrar.issue_prepayment_invoice(200)
|
||||
i = @registrar.invoices.last
|
||||
i.description.should start_with "Order nr."
|
||||
end
|
||||
|
||||
it 'should not allaw to use CID as code for leagcy reasons' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue