Bundle update rubocop and auto correct style issues
This commit is contained in:
parent
22fd814193
commit
9c9ebdf557
13 changed files with 42 additions and 37 deletions
|
|
@ -180,6 +180,6 @@ feature 'settling an order', js: true do
|
|||
end
|
||||
expect(page).to_not have_selector('form#new_order_article')
|
||||
expect(page).to have_content(new_article.name)
|
||||
expect(order.order_articles.where(article_id: new_article.id)).to_not be nil
|
||||
expect(order.order_articles.where(article_id: new_article.id)).to_not be_nil
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ describe BankTransaction do
|
|||
JSON
|
||||
|
||||
importer = BankAccountInformationImporter.new(bank_account)
|
||||
expect(importer.import!(content)).to be(nil)
|
||||
expect(importer.import!(content)).to be_nil
|
||||
end
|
||||
|
||||
it 'invalid JSON' do
|
||||
|
|
@ -241,7 +241,7 @@ describe BankTransaction do
|
|||
expect(bt.amount).to eq(-238.68)
|
||||
expect(bt.date).to eq('2019-02-13'.to_date)
|
||||
expect(bt.text).to eq('Hammersmith Inc.')
|
||||
expect(bt.iban).to be(nil)
|
||||
expect(bt.iban).to be_nil
|
||||
expect(bt.reference).to eq("Corvette Ersatzteile\nMartin Schöneicher, Inv# 123453423, Thx")
|
||||
expect(bt.receipt).to eq('Auslands-Überweisung')
|
||||
end
|
||||
|
|
@ -277,7 +277,7 @@ describe BankTransaction do
|
|||
expect(bt.amount).to eq(-12.3)
|
||||
expect(bt.date).to eq('2019-02-14'.to_date)
|
||||
expect(bt.text).to eq('superbank AG')
|
||||
expect(bt.iban).to be(nil)
|
||||
expect(bt.iban).to be_nil
|
||||
expect(bt.reference).to eq("Überweisung US, Wechselspesen u Provision")
|
||||
expect(bt.receipt).to eq('Spesen/Gebühren')
|
||||
end
|
||||
|
|
@ -399,14 +399,14 @@ describe BankTransaction do
|
|||
expect(bt2.text).to eq('CN2')
|
||||
expect(bt2.iban).to eq('CH9300762011623852957')
|
||||
expect(bt2.reference).to eq('RI2')
|
||||
expect(bt2.receipt).to be(nil)
|
||||
expect(bt2.receipt).to be_nil
|
||||
|
||||
bt3 = bank_account.bank_transactions.find_by_external_id("T3")
|
||||
expect(bt3.amount).to eq(33)
|
||||
expect(bt3.date).to eq('2000-03-01'.to_date)
|
||||
expect(bt3.text).to eq('DN3')
|
||||
expect(bt3.iban).to be(nil)
|
||||
expect(bt3.iban).to be_nil
|
||||
expect(bt3.reference).to eq('')
|
||||
expect(bt3.receipt).to be(nil)
|
||||
expect(bt3.receipt).to be_nil
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -2,35 +2,35 @@ require_relative '../spec_helper'
|
|||
|
||||
describe BankTransactionReference do
|
||||
it 'returns nil for empty input' do
|
||||
expect(BankTransactionReference.parse('')).to be nil
|
||||
expect(BankTransactionReference.parse('')).to be_nil
|
||||
end
|
||||
|
||||
it 'returns nil for invalid string' do
|
||||
expect(BankTransactionReference.parse('invalid')).to be nil
|
||||
expect(BankTransactionReference.parse('invalid')).to be_nil
|
||||
end
|
||||
|
||||
it 'returns nil for FS1A' do
|
||||
expect(BankTransactionReference.parse('FS1A')).to be nil
|
||||
expect(BankTransactionReference.parse('FS1A')).to be_nil
|
||||
end
|
||||
|
||||
it 'returns nil for FS1.1A' do
|
||||
expect(BankTransactionReference.parse('FS1.1A')).to be nil
|
||||
expect(BankTransactionReference.parse('FS1.1A')).to be_nil
|
||||
end
|
||||
|
||||
it 'returns nil for xFS1A1' do
|
||||
expect(BankTransactionReference.parse('xFS1A1')).to be nil
|
||||
expect(BankTransactionReference.parse('xFS1A1')).to be_nil
|
||||
end
|
||||
|
||||
it 'returns nil for .FS1A1' do
|
||||
expect(BankTransactionReference.parse('.FS1A1')).to be nil
|
||||
expect(BankTransactionReference.parse('.FS1A1')).to be_nil
|
||||
end
|
||||
|
||||
it 'returns nil for FS1A1x' do
|
||||
expect(BankTransactionReference.parse('FS1A1x')).to be nil
|
||||
expect(BankTransactionReference.parse('FS1A1x')).to be_nil
|
||||
end
|
||||
|
||||
it 'returns nil for FS1A1.' do
|
||||
expect(BankTransactionReference.parse('FS1A1.')).to be nil
|
||||
expect(BankTransactionReference.parse('FS1A1.')).to be_nil
|
||||
end
|
||||
|
||||
it 'returns correct value for FS1A1' do
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ describe FoodsoftConfig do
|
|||
end
|
||||
|
||||
it 'returns an empty default value' do
|
||||
expect(FoodsoftConfig[:protected][:LIUhniuyGNKUQTWfbiOQIWYexngo78hqexul]).to be nil
|
||||
expect(FoodsoftConfig[:protected][:LIUhniuyGNKUQTWfbiOQIWYexngo78hqexul]).to be_nil
|
||||
end
|
||||
|
||||
it 'returns a configuration value' do
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ describe BankTransaction do
|
|||
let!(:bank_transaction8) { create :bank_transaction, bank_account: bank_account, reference: "FS#{ordergroup.id}X10", amount: 10 }
|
||||
|
||||
it 'ignores transaction with invalid reference' do
|
||||
expect(bank_transaction1.assign_to_ordergroup).to be nil
|
||||
expect(bank_transaction1.assign_to_ordergroup).to be_nil
|
||||
end
|
||||
|
||||
it 'ignores transaction with invalid ordergroup' do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue