mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-26 01:33:22 +00:00
Update product serializer
This commit is contained in:
committed by
Gaetan Craig-Riou
parent
c5ec7e361b
commit
6025491f94
@@ -9,8 +9,6 @@ class Api::ProductSerializer < ActiveModel::Serializer
|
||||
|
||||
has_many :variants, serializer: Api::VariantSerializer
|
||||
|
||||
has_one :primary_taxon, serializer: Api::TaxonSerializer
|
||||
|
||||
has_one :image, serializer: Api::ImageSerializer
|
||||
has_one :supplier, serializer: Api::IdSerializer
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ describe Api::ProductSerializer do
|
||||
it "serializes various attributes" do
|
||||
expect(serializer.serializable_hash.keys).to eq [
|
||||
:id, :name, :meta_keywords, :group_buy, :notes, :description, :description_html,
|
||||
:properties_with_values, :variants, :primary_taxon, :image, :supplier
|
||||
:properties_with_values, :variants, :image, :supplier
|
||||
]
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user