Sha256: d5891792f583aee7e7a68a49974687295e286fff13c19fd1e36ca2fc84962be1
Contents?: true
Size: 741 Bytes
Versions: 3
Compression:
Stored size: 741 Bytes
Contents
# encoding: utf-8 require 'spec_helper' require 'backgrounder/workers/process_asset' describe worker = CarrierWave::Workers::ProcessAsset do before do @user = mock('User') @image = mock('UserAsset') @worker = worker.new(@user, '22', :image) end context "#perform" do it 'processes versions' do @user.expects(:find).with('22').returns(@user).once @user.expects(:image).once.returns(@image) @user.expects(:process_image_upload=).with(true).once @image.expects(:recreate_versions!).once.returns(true) @user.expects(:respond_to?).with(:image_processing).once.returns(true) @user.expects(:update_attribute).with(:image_processing, nil).once @worker.perform end end end
Version data entries
3 entries across 3 versions & 1 rubygems