Story#110308584 - update tests of registrar

This commit is contained in:
Vladimir Krylov 2016-04-15 15:41:57 +03:00
parent 352159a4c0
commit 04aaa14db9
2 changed files with 5 additions and 1 deletions

View file

@ -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

View file

@ -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