mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-04 22:16:08 +00:00
Fix spree admin products controller spec
This commit is contained in:
@@ -5,8 +5,6 @@ module PermittedAttributes
|
||||
def self.attributes
|
||||
[
|
||||
:id, :name, :description, :price,
|
||||
:variant_unit, :variant_unit_scale, :variant_unit_with_scale, :unit_value,
|
||||
:unit_description, :variant_unit_name,
|
||||
:display_as, :sku, :group_buy, :group_buy_unit_size,
|
||||
:taxon_ids, :primary_taxon_id, :tax_category_id, :supplier_id,
|
||||
:meta_keywords, :notes, :inherits_properties, :shipping_category_id,
|
||||
|
||||
@@ -4,11 +4,10 @@ module PermittedAttributes
|
||||
class Variant
|
||||
def self.attributes
|
||||
[
|
||||
:id, :sku, :on_hand, :on_demand, :shipping_category_id,
|
||||
:price, :unit_value, :unit_description,
|
||||
:display_name, :display_as, :tax_category_id,
|
||||
:weight, :height, :width, :depth, :taxon_ids, :primary_taxon_id,
|
||||
:supplier_id
|
||||
:id, :sku, :on_hand, :on_demand, :shipping_category_id, :price, :unit_value,
|
||||
:unit_description, :variant_unit, :variant_unit_name, :variant_unit_scale, :display_name,
|
||||
:display_as, :tax_category_id, :weight, :height, :width, :depth, :taxon_ids,
|
||||
:primary_taxon_id, :supplier_id
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -111,6 +111,8 @@ RSpec.describe Spree::Admin::ProductsController, type: :controller do
|
||||
"on_hand" => 2,
|
||||
"price" => "5.0",
|
||||
"unit_value" => 4,
|
||||
"variant_unit" => "weight",
|
||||
"variant_unit_scale" => "1",
|
||||
"unit_description" => "",
|
||||
"display_name" => "name",
|
||||
"primary_taxon_id" => taxon.id,
|
||||
|
||||
Reference in New Issue
Block a user