mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
Fix variant controller spec
This commit is contained in:
@@ -36,7 +36,7 @@ module OpenFoodNetwork
|
||||
Spree::Variant.
|
||||
ransack(search_params.merge(m: 'or')).
|
||||
result.
|
||||
order("spree_products.name, display_name, display_as, spree_products.variant_unit_name").
|
||||
order("spree_products.name, display_name, display_as, spree_variants.variant_unit_name").
|
||||
includes(:product).
|
||||
joins(:product)
|
||||
end
|
||||
|
||||
@@ -12,8 +12,8 @@ module Spree
|
||||
let(:product) { create(:product, name: 'Product A') }
|
||||
let(:deleted_variant) do
|
||||
deleted_variant = product.variants.create(
|
||||
unit_value: "2", price: 1, primary_taxon: create(:taxon),
|
||||
supplier: create(:supplier_enterprise)
|
||||
unit_value: "2", variant_unit: "weight", variant_unit_scale: 1, price: 1,
|
||||
primary_taxon: create(:taxon), supplier: create(:supplier_enterprise)
|
||||
)
|
||||
deleted_variant.delete
|
||||
deleted_variant
|
||||
|
||||
Reference in New Issue
Block a user