Sha256: 85b19990eb73019f1637fa92a02e12b756f57d80974ae0e632040ebd7bd26fc6

Contents?: true

Size: 613 Bytes

Versions: 4

Compression:

Stored size: 613 Bytes

Contents

require 'spec_helper'

describe Spree::ProductProperty, type: :model do
  context "touching" do
    it "should update product" do
      pp = create(:product_property)
      expect(pp.product).to receive(:touch)
      pp.touch
    end
  end

  context 'property_name=' do
    before do
      @pp = create(:product_property)
    end

    it "should assign property" do
      @pp.property_name = "Size"
      expect(@pp.property.name).to eq('Size')
    end
  end

  context 'ransackable_associations' do
    it { expect(Spree::ProductProperty.whitelisted_ransackable_associations).to include('property') }
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
spree_core-3.3.0.rc1 spec/models/spree/product_property_spec.rb
spree_core-3.2.1 spec/models/spree/product_property_spec.rb
spree_core-3.2.0 spec/models/spree/product_property_spec.rb
spree_core-3.2.0.rc3 spec/models/spree/product_property_spec.rb