Sha256: 00fa929f49743bd14fd37f85f4cb11a74ed2531119731596e9dce024989b4224
Contents?: true
Size: 857 Bytes
Versions: 8
Compression:
Stored size: 857 Bytes
Contents
describe Spree::ImageSerializer do let(:image) { create :image } subject { ActiveModel::Serializer::Adapter::JsonApi.new(described_class.new image) } its(:to_json) do is_expected.to be_json_eql <<-JSON { "data" : { "attributes" : { "alt" : null, "links" : { "large" : "#{image.attachment.url(:large)}", "mini" : "#{image.attachment.url(:mini)}", "original" : "#{image.attachment.url(:original)}", "product" : "#{image.attachment.url(:product)}", "small" : "#{image.attachment.url(:small)}" }, "position" : 1 }, "relationships" : { "viewable" : { "data" : null } }, "type" : "spree_images" } } JSON end end
Version data entries
8 entries across 8 versions & 3 rubygems