chore: rubocop

chore: fix api test conventions

chore: rubocop -A spec/

chore: more rubocop -A

fix failing test

rubocop fixes

removes helper methods that are in my opinion dead code

more rubocop fixes

rubocop -a --auto-gen-config
This commit is contained in:
Philipp Rothmann 2023-05-12 13:01:12 +02:00 committed by Philipp Rothmann
parent f6fb804bbe
commit fb2b4d8a8a
331 changed files with 4263 additions and 4507 deletions

View file

@ -1,12 +1,12 @@
require_relative '../spec_helper'
feature 'product distribution', js: true do
let(:ftt) { create :financial_transaction_type }
let(:admin) { create :admin }
let(:user_a) { create :user, groups: [create(:ordergroup)] }
let(:user_b) { create :user, groups: [create(:ordergroup)] }
let(:supplier) { create :supplier }
let(:article) { create :article, supplier: supplier, unit_quantity: 5 }
let(:ftt) { create(:financial_transaction_type) }
let(:admin) { create(:admin) }
let(:user_a) { create(:user, groups: [create(:ordergroup)]) }
let(:user_b) { create(:user, groups: [create(:ordergroup)]) }
let(:supplier) { create(:supplier) }
let(:article) { create(:article, supplier: supplier, unit_quantity: 5) }
let(:order) { create(:order, supplier: supplier, article_ids: [article.id]) }
let(:oa) { order.order_articles.first }
@ -50,10 +50,10 @@ feature 'product distribution', js: true do
expect(oa.quantity).to eq(6)
expect(oa.tolerance).to eq(1)
# Gruppe a bekommt 3 einheiten.
goa_a = oa.group_order_articles.joins(:group_order).where(:group_orders => { :ordergroup_id => user_a.ordergroup.id }).first
goa_a = oa.group_order_articles.joins(:group_order).where(group_orders: { ordergroup_id: user_a.ordergroup.id }).first
expect(goa_a.result).to eq(3)
# gruppe b bekommt 2 einheiten.
goa_b = oa.group_order_articles.joins(:group_order).where(:group_orders => { :ordergroup_id => user_b.ordergroup.id }).first
goa_b = oa.group_order_articles.joins(:group_order).where(group_orders: { ordergroup_id: user_b.ordergroup.id }).first
expect(goa_b.result).to eq(2)
end
end