Sha256: 11f1c2a0d95709a0fb810541439d7d4620e073baeed74d27656ecb2fc3138c36
Contents?: true
Size: 692 Bytes
Versions: 8
Compression:
Stored size: 692 Bytes
Contents
describe Spree::PriceSerializer do let(:price) { create :price } subject { ActiveModel::Serializer::Adapter::JsonApi.new(described_class.new price) } its(:to_json) do is_expected.to be_json_eql <<-JSON { "data" : { "attributes" : { "amount" : "19.99", "currency" : "USD", "display_amount" : "$19.99", "display_price" : "$19.99", "price" : "19.99" }, "relationships" : { "variant" : { "data" : { "type" : "spree_variants" } } }, "type" : "spree_prices" } } JSON end end
Version data entries
8 entries across 8 versions & 3 rubygems