From bd05f40b171d2bb28eb60064f42d945e029706ac Mon Sep 17 00:00:00 2001 From: paulo-felipe Date: Wed, 17 May 2023 22:43:22 -0300 Subject: [PATCH] lint(spec/system/admin/subscriptions_spec.rb): issue #7483 Solve line too long offense and separate variables from expectations. --- spec/system/admin/subscriptions_spec.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/system/admin/subscriptions_spec.rb b/spec/system/admin/subscriptions_spec.rb index d18ec8217a..f2d5e6b8fe 100644 --- a/spec/system/admin/subscriptions_spec.rb +++ b/spec/system/admin/subscriptions_spec.rb @@ -414,11 +414,12 @@ describe 'Subscriptions' do end it 'has selector for price, input for quantity and selector for total price' do + description = "#{shop_product.name} - #{shop_variant.full_name}" first("td.items.panel-toggle").click within 'table#subscription-line-items tr.item', match: :first do expect(page).to have_selector '.description', - text: "#{shop_product.name} - #{shop_variant.full_name}" + text: description expect(page).to have_selector 'td.price', text: "$7.75" expect(page).to have_input 'quantity', with: "3" expect(page).to have_selector 'td.total', text: "$23.25" @@ -427,6 +428,7 @@ describe 'Subscriptions' do it 'sets basic properties of subscription' do subscription = Subscription.last + expect(subscription.customer).to eq customer expect(subscription.schedule).to eq schedule expect(subscription.payment_method).to eq payment_method