Sha256: 3c036ff7b2680089ab451d0dbf5f4e022542680d2f049487d6056593433c4909

Contents?: true

Size: 612 Bytes

Versions: 9

Compression:

Stored size: 612 Bytes

Contents

require 'spec_helper'

describe Spree::V2::Storefront::VendorImageSerializer do
  let!(:vendor_image) { create(:vendor_image) }
  let!(:vendor) { create(:active_vendor, name: 'vendor', image: vendor_image) }

  subject { described_class.new(vendor_image) }

  it { expect(subject.serializable_hash).to be_kind_of(Hash) }

  it 'returns right data attributes' do
    expect(subject.serializable_hash[:data].keys).to contain_exactly(:id, :type, :attributes)
  end

  it 'returns right vendor_image attributes' do
    expect(subject.serializable_hash[:data][:attributes].keys).to contain_exactly(:styles)
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
spree_multi_vendor-2.5.0 spec/serializers/spree/v2/storefront/vendor_image_serializer_spec.rb
spree_multi_vendor-2.4.1 spec/serializers/spree/v2/storefront/vendor_image_serializer_spec.rb
atkhayar-dev-spree-multi-vendor-0.0.0 spec/serializers/spree/v2/storefront/vendor_image_serializer_spec.rb
spree_multi_vendor-2.4.0 spec/serializers/spree/v2/storefront/vendor_image_serializer_spec.rb
spree_multi_vendor-2.3.0 spec/serializers/spree/v2/storefront/vendor_image_serializer_spec.rb
spree_multi_vendor-2.2.0 spec/serializers/spree/v2/storefront/vendor_image_serializer_spec.rb
spree_multi_vendor-2.1.0 spec/serializers/spree/v2/storefront/vendor_image_serializer_spec.rb
spree_multi_vendor-2.0.2 spec/serializers/spree/v2/storefront/vendor_image_serializer_spec.rb
spree_multi_vendor-2.0.1 spec/serializers/spree/v2/storefront/vendor_image_serializer_spec.rb