Sha256: 627a14d8ac2679da14f8b65db2c867c4bac115829dd02410d1561e8da28e7e10

Contents?: true

Size: 420 Bytes

Versions: 5

Compression:

Stored size: 420 Bytes

Contents

require 'spec_helper'

describe Object do
  context "bullet_key" do
    it "should return class and id composition" do
      post = Post.first
      expect(post.bullet_key).to eq("Post:#{post.id}")
    end

    if mongoid?
      it "should return class with namesapce and id composition" do
        post = Mongoid::Post.first
        expect(post.bullet_key).to eq("Mongoid::Post:#{post.id}")
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
bullet_instructure-4.0.5 spec/bullet/ext/object_spec.rb
bullet_instructure-4.0.3 spec/bullet/ext/object_spec.rb
bullet_instructure-4.0.2 spec/bullet/ext/object_spec.rb
bullet-4.11.3 spec/bullet/ext/object_spec.rb
bullet-4.11.2 spec/bullet/ext/object_spec.rb