Sha256: 54de5eb8594e2d5987d7937da379de29da026a27a7ac8965c11fb6678944ccf1
Contents?: true
Size: 841 Bytes
Versions: 15
Compression:
Stored size: 841 Bytes
Contents
require 'test_helper' require 'base_delayed_paperclip_test' require 'resque' class ResquePaperclipTest < Test::Unit::TestCase include BaseDelayedPaperclipTest def setup super # Make sure that we just test Resque in here DelayedPaperclip.options[:background_job_class] = DelayedPaperclip::Jobs::Resque Resque.remove_queue(:paperclip) end def process_jobs worker = Resque::Worker.new(:paperclip) worker.process end def jobs_count Resque.size(:paperclip) end def test_perform_job dummy = Dummy.new(:image => File.open("#{RAILS_ROOT}/test/fixtures/12k.png")) dummy.image = File.open("#{RAILS_ROOT}/test/fixtures/12k.png") Paperclip::Attachment.any_instance.expects(:reprocess!) dummy.save! DelayedPaperclip::Jobs::Resque.perform(dummy.class.name, dummy.id, :image) end end
Version data entries
15 entries across 15 versions & 1 rubygems