mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-11 23:17:48 +00:00
Cosmetic change
This commit is contained in:
@@ -9,12 +9,12 @@ Spree::Variant.class_eval do
|
||||
accepts_nested_attributes_for :images
|
||||
|
||||
validates_presence_of :unit_value,
|
||||
if: -> v { %w(weight volume).include? v.product.andand.variant_unit },
|
||||
unless: :is_master
|
||||
if: -> v { %w(weight volume).include? v.product.andand.variant_unit },
|
||||
unless: :is_master
|
||||
|
||||
validates_presence_of :unit_description,
|
||||
if: -> v { v.product.andand.variant_unit.present? && v.unit_value.nil? },
|
||||
unless: :is_master
|
||||
if: -> v { v.product.andand.variant_unit.present? && v.unit_value.nil? },
|
||||
unless: :is_master
|
||||
|
||||
before_validation :update_weight_from_unit_value, if: -> v { v.product.present? }
|
||||
after_save :update_units
|
||||
|
||||
@@ -119,7 +119,6 @@ feature "As a consumer I want to shop with a distributor", js: true do
|
||||
page.should have_price "$53.00"
|
||||
|
||||
# Product price should be listed as the lesser of these
|
||||
#page.should have_selector 'tr.product > td', text: "from $43.00"
|
||||
page.should have_price "$43.00"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user