Sha256: af75e742eebda0c4d503fb41136d3b19d9f348c964ab339da34d09b5274d5ed9

Contents?: true

Size: 825 Bytes

Versions: 22

Compression:

Stored size: 825 Bytes

Contents

# frozen_string_literal: true

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_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_key, :associations)
        end
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
bullet-7.0.7 spec/bullet/detector/association_spec.rb
bullet-7.0.6 spec/bullet/detector/association_spec.rb
bullet-7.0.5 spec/bullet/detector/association_spec.rb
bullet-7.0.4 spec/bullet/detector/association_spec.rb
bullet-7.0.3 spec/bullet/detector/association_spec.rb
bullet-7.0.2 spec/bullet/detector/association_spec.rb
bullet-7.0.1 spec/bullet/detector/association_spec.rb
bullet-7.0.0 spec/bullet/detector/association_spec.rb
bullet-6.1.5 spec/bullet/detector/association_spec.rb
bullet-6.1.4 spec/bullet/detector/association_spec.rb
bullet-6.1.3 spec/bullet/detector/association_spec.rb
bullet-6.1.2 spec/bullet/detector/association_spec.rb
bullet-6.1.1 spec/bullet/detector/association_spec.rb
bullet-6.1.0 spec/bullet/detector/association_spec.rb
bullet-6.0.2 spec/bullet/detector/association_spec.rb
bullet-6.0.1 spec/bullet/detector/association_spec.rb
bullet-6.0.0 spec/bullet/detector/association_spec.rb
bullet-5.9.0 spec/bullet/detector/association_spec.rb
bullet-5.8.1 spec/bullet/detector/association_spec.rb
bullet-5.8.0 spec/bullet/detector/association_spec.rb