Sha256: 228a6ab9f8d22264ad01b42039193c31aefbe4866221ce70b789d33af1ef5013

Contents?: true

Size: 612 Bytes

Versions: 25

Compression:

Stored size: 612 Bytes

Contents

require 'rails_helper'

module ActiveAdmin
  describe Resource, "Includes" do
    describe "#includes" do

      let(:application) { ActiveAdmin::Application.new }
      let(:namespace) { ActiveAdmin::Namespace.new application, :admin }
      let(:resource_config) { ActiveAdmin::Resource.new namespace, Post }
      let(:dsl){ ActiveAdmin::ResourceDSL.new(resource_config, Post) }

      it "should register the includes in the config" do
        dsl.run_registration_block do
          includes :taggings, :author
        end
        expect(resource_config.includes.size).to eq(2)
      end

    end
  end
end

Version data entries

25 entries across 25 versions & 4 rubygems

Version Path
activeadmin-1.0.0.pre2 spec/unit/resource/includes_spec.rb
activeadmin-1.0.0.pre1 spec/unit/resource/includes_spec.rb
yousty-activeadmin-1.0.7.pre spec/unit/resource/includes_spec.rb
yousty-activeadmin-1.0.6.pre spec/unit/resource/includes_spec.rb
yousty-activeadmin-1.0.5.pre spec/unit/resource/includes_spec.rb