Sha256: d17ea387ce647ee0a5362a2b29de4e7478342feed151ee468f9f63140b893385

Contents?: true

Size: 761 Bytes

Versions: 5

Compression:

Stored size: 761 Bytes

Contents

require "spec_helper"
require "mongoid/publishable/queuing"

describe Mongoid::Publishable::Queuing do
  subject do
    QueuingController.new
  end
  
  describe "#deserialize_publishing_queue" do
    it "should make the queue accessible via #publishing_queue" do
      subject.send(:deserialize_publishing_queue)
      expect(subject.publishing_queue).to respond_to :<<
    end
  end
  
  describe "#serialize_publishing_queue" do
    it "should dump the data data to the session" do
      data = { :one => "two" }
      subject.send(:deserialize_publishing_queue)
      subject.publishing_queue.should_receive(:dump).and_return(data)
      subject.send(:serialize_publishing_queue)
      expect(subject.session[:publishing_queue]).to eq data
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mongoid-publishable-0.0.5 spec/mongoid/publishable/queuing_spec.rb
mongoid-publishable-0.0.4 spec/mongoid/publishable/queuing_spec.rb
mongoid-publishable-0.0.3 spec/mongoid/publishable/queuing_spec.rb
mongoid-publishable-0.0.2 spec/mongoid/publishable/queuing_spec.rb
mongoid-publishable-0.0.1 spec/mongoid/publishable/queuing_spec.rb