mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
27 lines
578 B
Ruby
27 lines
578 B
Ruby
require 'spec_helper'
|
|
|
|
describe Api::VariantSerializer do
|
|
subject { Api::VariantSerializer.new variant }
|
|
let(:variant) { create(:variant) }
|
|
|
|
it "includes the expected attributes" do
|
|
expect(subject.attributes.keys).
|
|
to include(
|
|
:id,
|
|
:name_to_display,
|
|
:is_master,
|
|
:on_hand,
|
|
:name_to_display,
|
|
:unit_to_display,
|
|
:unit_value,
|
|
:options_text,
|
|
:on_demand,
|
|
:price,
|
|
:fees,
|
|
:price_with_fees,
|
|
:product_name,
|
|
:tag_list # Used to apply tag rules
|
|
)
|
|
end
|
|
end
|