Sha256: 164de8ec52ed8ac77a6c4a5d35c8c579e9f05c95ef5afab1e3c3beceb8f64c3d

Contents?: true

Size: 409 Bytes

Versions: 4

Compression:

Stored size: 409 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

module Spree
  describe AssembliesPart do
    let(:product) { create(:product) }
    let(:variant) { create(:variant) }

    before do
      product.parts.push variant
    end

    context "get" do
      it "brings part by product and variant id" do
        expect(subject.class.get(product.id, variant.id).part).to eq variant
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
solidus_product_assembly-1.4.0 spec/models/spree/assemblies_part_spec.rb
solidus_product_assembly-1.3.0 spec/models/spree/assemblies_part_spec.rb
solidus_product_assembly-1.2.0 spec/models/spree/assemblies_part_spec.rb
solidus_product_assembly-1.1.0 spec/models/spree/assemblies_part_spec.rb