Sha256: 0916339915611edc76bebc39ca51ad8da891c9e2a94aebbed9086b24f4370565

Contents?: true

Size: 800 Bytes

Versions: 3

Compression:

Stored size: 800 Bytes

Contents

require 'spec_helper'

module Bullet
  module Detector
    describe Association do
      before :all do
        @post1 = Post.first
        @post2 = Post.last
      end

      context ".add_object_association" do
        it "should add object, associations pair" do
          Association.add_object_associations(@post1, :associations)
          expect(Association.send(:object_associations)).to be_include(@post1.bullet_ar_key, :associations)
        end
      end

      context ".add_call_object_associations" do
        it "should add call object, associations pair" do
          Association.add_call_object_associations(@post1, :associations)
          expect(Association.send(:call_object_associations)).to be_include(@post1.bullet_ar_key, :associations)
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bullet-4.11.1 spec/bullet/detector/association_spec.rb
bullet-4.11.0 spec/bullet/detector/association_spec.rb
bullet-4.10.0 spec/bullet/detector/association_spec.rb