From 1a2b23ec88f5dc9b4bc1e679dd768bf81e6ddfef Mon Sep 17 00:00:00 2001 From: Philipp Rothmann Date: Sun, 5 Mar 2023 11:12:11 +0100 Subject: [PATCH] fix: rubocop violations controller tests --- spec/controllers/articles_controller_spec.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spec/controllers/articles_controller_spec.rb b/spec/controllers/articles_controller_spec.rb index dae89c70..30c7c544 100644 --- a/spec/controllers/articles_controller_spec.rb +++ b/spec/controllers/articles_controller_spec.rb @@ -7,10 +7,10 @@ describe ArticlesController, type: :controller do let(:article_category_a) { create :article_category, name: "AAAA" } let(:article_category_b) { create :article_category, name: "BBBB" } let(:article_category_c) { create :article_category, name: "CCCC" } - let(:supplier) { create :supplier} + let(:supplier) { create :supplier } let(:article_a) { create :article, name: 'AAAA', note: "ZZZZ", unit: '750 g', article_category: article_category_b, availability: false, supplier_id: supplier.id } let(:article_b) { create :article, name: 'BBBB', note: "XXXX", unit: '500 g', article_category: article_category_a, availability: true, supplier_id: supplier.id } - let(:article_c) { create :article, name: 'CCCC', note: "YYYY", unit: '250 g', article_category: article_category_c, availability: true, supplier_id: supplier.id } + let(:article_c) { create :article, name: 'CCCC', note: "YYYY", unit: '250 g', article_category: article_category_c, availability: true, supplier_id: supplier.id } let(:article_no_supplier) { create :article, name: 'no_supplier', note: "no_supplier", unit: '100 g', article_category: article_category_b, availability: true } let(:order) { create :order } @@ -36,6 +36,7 @@ describe ArticlesController, type: :controller do article_c supplier.reload end + it 'assigns sorting on articles' do sortings = [ ['name', [article_a, article_b, article_c]],