mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Refer to unit from variant
variant_unit was moved to variant as part of product refactor. Old products probably still had a value there, but new ones would have been appearing with nil.
This commit is contained in:
@@ -50,7 +50,7 @@ class AffiliateSalesQuery
|
||||
<<~SQL.squish
|
||||
spree_products.name AS product_name,
|
||||
spree_variants.display_name AS unit_name,
|
||||
spree_products.variant_unit AS unit_type,
|
||||
spree_variants.variant_unit AS unit_type,
|
||||
spree_variants.unit_value AS units,
|
||||
spree_variants.unit_presentation,
|
||||
spree_line_items.price,
|
||||
|
||||
@@ -61,7 +61,6 @@ RSpec.describe AffiliateSalesQuery do
|
||||
it "returns data" do
|
||||
labelled_row = query.label_row(query.data(order1.distributor).first)
|
||||
|
||||
pending "unit_type"
|
||||
expect(labelled_row).to include(
|
||||
product_name: "Tomatoes",
|
||||
unit_name: "Tomatoes - Roma",
|
||||
|
||||
Reference in New Issue
Block a user