From 997b29c04f6144bb0544fcdfcb6029d068935f11 Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Thu, 16 May 2019 14:34:06 +0300 Subject: [PATCH] Remove useless specs --- spec/models/bank_statement_spec.rb | 62 ------------------------------ 1 file changed, 62 deletions(-) delete mode 100644 spec/models/bank_statement_spec.rb diff --git a/spec/models/bank_statement_spec.rb b/spec/models/bank_statement_spec.rb deleted file mode 100644 index f31749ba2..000000000 --- a/spec/models/bank_statement_spec.rb +++ /dev/null @@ -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