From 0703bb4583d3eb45dbc120291d5bf3e919a9593d Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Sat, 3 Jun 2023 18:58:03 +0100 Subject: [PATCH] Remove unused `is_master` references in tests --- .../enterprise_fee_summary_report_spec.rb | 2 +- .../products_and_inventory_report_spec.rb | 2 +- spec/system/admin/bulk_product_update_spec.rb | 16 ++++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/spec/lib/reports/enterprise_fee_summary/enterprise_fee_summary_report_spec.rb b/spec/lib/reports/enterprise_fee_summary/enterprise_fee_summary_report_spec.rb index 58711f74ba..cfe3d8058f 100644 --- a/spec/lib/reports/enterprise_fee_summary/enterprise_fee_summary_report_spec.rb +++ b/spec/lib/reports/enterprise_fee_summary/enterprise_fee_summary_report_spec.rb @@ -718,7 +718,7 @@ describe Reporting::Reports::EnterpriseFeeSummary::Base do end def default_variant_options - { product: product, producer: producer, is_master: false, coordinator: coordinator, + { product: product, producer: producer, coordinator: coordinator, distributor: distributor, order_cycle: order_cycle } end diff --git a/spec/lib/reports/products_and_inventory_report_spec.rb b/spec/lib/reports/products_and_inventory_report_spec.rb index 1ec1786f66..193a46e7b8 100644 --- a/spec/lib/reports/products_and_inventory_report_spec.rb +++ b/spec/lib/reports/products_and_inventory_report_spec.rb @@ -105,7 +105,7 @@ module Reporting end describe "Filtering variants" do - let(:variants) { Spree::Variant.where(nil).joins(:product).where(is_master: false) } + let(:variants) { Spree::Variant.where(nil).joins(:product) } describe "based on report type" do it "returns only variants on hand" do diff --git a/spec/system/admin/bulk_product_update_spec.rb b/spec/system/admin/bulk_product_update_spec.rb index 3235d56cbf..9eec3c4761 100644 --- a/spec/system/admin/bulk_product_update_spec.rb +++ b/spec/system/admin/bulk_product_update_spec.rb @@ -72,8 +72,8 @@ describe ' it "displays 'on demand' for any variant that is available on demand" do p1 = FactoryBot.create(:product) - v1 = FactoryBot.create(:variant, product: p1, is_master: false, on_hand: 4) - v2 = FactoryBot.create(:variant, product: p1, is_master: false, on_hand: 0, on_demand: true) + v1 = FactoryBot.create(:variant, product: p1, on_hand: 4) + v2 = FactoryBot.create(:variant, product: p1, on_hand: 0, on_demand: true) visit spree.admin_products_path expect(page).to have_selector "a.view-variants", count: 1 @@ -128,10 +128,10 @@ describe ' p1 = FactoryBot.create(:product) v0 = p1.variants.first v0.update_attribute(:on_demand, false) - v1 = FactoryBot.create(:variant, product: p1, is_master: false, on_hand: 15) + v1 = FactoryBot.create(:variant, product: p1, on_hand: 15) v1.update_attribute(:on_demand, false) p1.variants << v1 - v2 = FactoryBot.create(:variant, product: p1, is_master: false, on_hand: 6) + v2 = FactoryBot.create(:variant, product: p1, on_hand: 6) v2.update_attribute(:on_demand, false) p1.variants << v2 @@ -147,8 +147,8 @@ describe ' it "displays a price input (for each variant) for each product" do p1 = create(:product, price: 2.0) - v1 = create(:variant, product: p1, is_master: false, price: 12.75) - v2 = create(:variant, product: p1, is_master: false, price: 2.50) + v1 = create(:variant, product: p1, price: 12.75) + v2 = create(:variant, product: p1, price: 2.50) visit spree.admin_products_path expect(page).to have_selector "a.view-variants", count: 1 @@ -161,9 +161,9 @@ describe ' it "displays a unit value field (for each variant) for each product" do p1 = FactoryBot.create(:product, price: 2.0, variant_unit: "weight", variant_unit_scale: "1000") - v1 = FactoryBot.create(:variant, product: p1, is_master: false, price: 12.75, + v1 = FactoryBot.create(:variant, product: p1, price: 12.75, unit_value: 1200, unit_description: "(small bag)", display_as: "bag") - v2 = FactoryBot.create(:variant, product: p1, is_master: false, price: 2.50, + v2 = FactoryBot.create(:variant, product: p1, price: 2.50, unit_value: 4800, unit_description: "(large bag)", display_as: "bin") visit spree.admin_products_path