Sha256: 54e91093fb5f29f3ea5b56629b6095021093b19956c1d54b098ebe1510be405e

Contents?: true

Size: 558 Bytes

Versions: 83

Compression:

Stored size: 558 Bytes

Contents

require 'spec_helper'

describe Tenon::ItemAsset do
  describe '#reprocess_asset' do
    let(:ia) { Tenon::ItemAsset.new }
    let(:asset) { double }
    before do
      Tenon::ItemAsset.any_instance.stub(:asset) { asset }
    end

    it 'should reload the asset and reprocess the attachment' do
      Tenon::ItemAsset.any_instance.stub(:asset_id_changed?) { true }
      expect(asset).to receive(:reload) { asset }
      expect(asset).to receive(:attachment) { asset }
      expect(asset).to receive(:reprocess!)
      ia.reprocess_asset
    end
  end
end

Version data entries

83 entries across 83 versions & 1 rubygems

Version Path
tenon-1.0.22 spec/models/tenon/item_asset_spec.rb
tenon-1.0.21 spec/models/tenon/item_asset_spec.rb
tenon-1.0.20 spec/models/tenon/item_asset_spec.rb
tenon-1.0.19 spec/models/tenon/item_asset_spec.rb
tenon-1.0.18 spec/models/tenon/item_asset_spec.rb
tenon-1.0.17 spec/models/tenon/item_asset_spec.rb
tenon-1.0.16 spec/models/tenon/item_asset_spec.rb
tenon-1.0.15 spec/models/tenon/item_asset_spec.rb
tenon-1.0.14 spec/models/tenon/item_asset_spec.rb
tenon-1.0.13 spec/models/tenon/item_asset_spec.rb
tenon-1.0.12 spec/models/tenon/item_asset_spec.rb
tenon-1.0.11 spec/models/tenon/item_asset_spec.rb
tenon-1.0.10 spec/models/tenon/item_asset_spec.rb
tenon-1.0.9 spec/models/tenon/item_asset_spec.rb
tenon-1.0.8 spec/models/tenon/item_asset_spec.rb
tenon-1.0.7 spec/models/tenon/item_asset_spec.rb
tenon-1.0.6 spec/models/tenon/item_asset_spec.rb
tenon-1.0.5 spec/models/tenon/item_asset_spec.rb
tenon-1.0.4 spec/models/tenon/item_asset_spec.rb
tenon-1.0.3 spec/models/tenon/item_asset_spec.rb