mirror of
https://github.com/internetee/registry.git
synced 2025-06-08 13:44:47 +02:00
Remove useless specs
This commit is contained in:
parent
6faf0c3dd7
commit
997b29c04f
1 changed files with 0 additions and 62 deletions
|
@ -1,62 +0,0 @@
|
|||
require 'rails_helper'
|
||||
|
||||
describe BankStatement do
|
||||
context 'with invalid attribute' do
|
||||
before :all do
|
||||
@bank_statement = BankStatement.new
|
||||
end
|
||||
|
||||
it 'should not have any versions' do
|
||||
@bank_statement.versions.should == []
|
||||
end
|
||||
end
|
||||
|
||||
context 'with valid attributes' do
|
||||
before do
|
||||
@bank_statement = create(:bank_statement)
|
||||
end
|
||||
|
||||
it 'should not bind transactions with invalid match data' do
|
||||
r = create(:registrar, reference_no: '1234')
|
||||
|
||||
create(:account, registrar: r, account_type: 'cash', balance: 0)
|
||||
|
||||
r.issue_prepayment_invoice(200, 'add some money')
|
||||
|
||||
bs = create(:bank_statement, bank_transactions: [
|
||||
create(:bank_transaction, {
|
||||
sum: 240.0, # with vat
|
||||
reference_no: 'RF7086666662',
|
||||
description: 'Invoice no. 1'
|
||||
}),
|
||||
create(:bank_transaction, {
|
||||
sum: 240.0,
|
||||
reference_no: '1234',
|
||||
description: 'Invoice no. 4948934'
|
||||
})
|
||||
])
|
||||
|
||||
bs.bank_transactions.count.should == 4
|
||||
|
||||
AccountActivity.count.should == 0
|
||||
bs.bind_invoices
|
||||
|
||||
AccountActivity.count.should == 0
|
||||
|
||||
r.cash_account.balance.should == 0.0
|
||||
|
||||
bs.bank_transactions.unbinded.count.should == 4
|
||||
bs.not_binded?.should == true
|
||||
end
|
||||
|
||||
it 'should have one version' do
|
||||
with_versioning do
|
||||
@bank_statement.versions.should == []
|
||||
@bank_statement.bank_code = 'new_code'
|
||||
@bank_statement.save
|
||||
@bank_statement.errors.full_messages.should match_array([])
|
||||
@bank_statement.versions.size.should == 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue