Sha256: e9a072f8dbe0691a8d8112b1c9677906fc39b9ddd10ff2214f918732593dde71
Contents?: true
Size: 670 Bytes
Versions: 16
Compression:
Stored size: 670 Bytes
Contents
require 'spec_helper' describe Spree::Asset, :type => :model do describe "#viewable" do it "touches association" do product = build(:custom_product) expect do Spree::Asset.create! { |a| a.viewable = product.master } end.to change { product.updated_at } end end describe "#acts_as_list scope" do it "should start from first position for different viewables" do asset1 = Spree::Asset.create(viewable_type: 'Spree::Image', viewable_id: 1) asset2 = Spree::Asset.create(viewable_type: 'Spree::LineItem', viewable_id: 1) expect(asset1.position).to eq 1 expect(asset2.position).to eq 1 end end end
Version data entries
16 entries across 16 versions & 1 rubygems