mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 19:48:28 +02:00
Add registrar invoice spec
This commit is contained in:
parent
7eff257434
commit
fb318e37cb
1 changed files with 9 additions and 0 deletions
|
@ -84,5 +84,14 @@ describe Registrar do
|
|||
@new_registrar.errors.full_messages.should == []
|
||||
@new_registrar.code.should == 'uniq1'
|
||||
end
|
||||
|
||||
it 'should be able to issue a prepayment invoice' do
|
||||
Fabricate(:registrar, name: 'EIS', reg_no: '90010019')
|
||||
@registrar.issue_prepayment_invoice(200, 'add some money')
|
||||
@registrar.invoices.count.should == 1
|
||||
i = @registrar.invoices.first
|
||||
i.total.should == BigDecimal.new('240.0')
|
||||
i.description.should == 'add some money'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue