From 313fdab346ae2e13db5a16614a8529964e2f6ae2 Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou Date: Wed, 8 Feb 2023 11:53:44 +1100 Subject: [PATCH] Fix rubocop warnings --- spec/components/product_component_spec.rb | 33 ++++++++++++++--------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/spec/components/product_component_spec.rb b/spec/components/product_component_spec.rb index 8695d8c8c2..2259cbcc35 100644 --- a/spec/components/product_component_spec.rb +++ b/spec/components/product_component_spec.rb @@ -7,9 +7,11 @@ describe ProductComponent, type: :component do describe 'unit' do before do - render_inline(ProductComponent.new( - product: product, columns: [{ label: "Unit", value: "unit", sortable: false }] - )) + render_inline( + ProductComponent.new( + product: product, columns: [{ label: "Unit", value: "unit", sortable: false }] + ) + ) end it 'concatenates the unit value and the unit description' do @@ -26,9 +28,11 @@ describe ProductComponent, type: :component do end before do - render_inline(ProductComponent.new( - product: product, columns: [{ label: "Category", value: "category", sortable: false }] - )) + render_inline( + ProductComponent.new( + product: product, columns: [{ label: "Category", value: "category", sortable: false }] + ) + ) end it "joins the categories' name" do @@ -41,9 +45,11 @@ describe ProductComponent, type: :component do let(:on_hand) { 5 } before do - render_inline(ProductComponent.new( - product: product, columns: [{ label: "On Hand", value: "on_hand", sortable: false }] - )) + render_inline( + ProductComponent.new( + product: product, columns: [{ label: "On Hand", value: "on_hand", sortable: false }] + ) + ) end it 'return product on_hand' do @@ -65,9 +71,12 @@ describe ProductComponent, type: :component do let(:available_on) { Time.zone.now } before do - render_inline(ProductComponent.new( - product: product, columns: [{ label: "Available On", value: "available_on", sortable: false }] - )) + render_inline( + ProductComponent.new( + product: product, + columns: [{ label: "Available On", value: "available_on", sortable: false }] + ) + ) end it 'return formated available_on' do