Fix rubocop warning

This commit is contained in:
Gaetan Craig-Riou
2023-09-28 10:33:55 +02:00
committed by Maikel Linke
parent 1a66f3d94f
commit 7f2c1feaf8
2 changed files with 3 additions and 7 deletions

View File

@@ -5,9 +5,7 @@ require "spec_helper"
describe Admin::OrdersHelper, type: :helper do
describe "#order_adjustments_for_display" do
let(:order) { create(:order) }
let(:service) do
instance_double(VoucherAdjustmentsService, voucher_included_tax: voucher_included_tax)
end
let(:service) { instance_double(VoucherAdjustmentsService, voucher_included_tax:) }
let(:voucher_included_tax) { 0.0 }
before do
@@ -44,7 +42,7 @@ describe Admin::OrdersHelper, type: :helper do
context "with a voucher with tax included in price" do
let(:enterprise) { build(:enterprise) }
let(:voucher) do
create(:voucher_flat_rate, code: 'new_code', enterprise: enterprise, amount: 10)
create(:voucher_flat_rate, code: 'new_code', enterprise:, amount: 10)
end
let(:voucher_included_tax) { -0.5 }

View File

@@ -19,9 +19,7 @@ describe CheckoutHelper, type: :helper do
subject(:display_checkout_tax_total) { helper.display_checkout_tax_total(order) }
let(:order) { instance_double(Spree::Order, total_tax: 123.45, currency: 'AUD') }
let(:service) do
instance_double(VoucherAdjustmentsService, voucher_included_tax: voucher_included_tax)
end
let(:service) { instance_double(VoucherAdjustmentsService, voucher_included_tax: ) }
let(:voucher_included_tax) { 0.0 }
before do