Sha256: 8ee0f22244ce000f2af6958933811f0c93d10a0cb82df932b5027da6fe16d5e1

Contents?: true

Size: 485 Bytes

Versions: 19

Compression:

Stored size: 485 Bytes

Contents

require 'rails_helper'

RSpec.describe ActiveAdmin::Filters::Active do

  let(:resource) do
    namespace = ActiveAdmin::Namespace.new(ActiveAdmin::Application.new, :admin)
    namespace.register(Post)
  end

  subject { described_class.new(resource, search) }

  let(:params) do
    ::ActionController::Parameters.new(q: {author_id_eq: 1})
  end

  let(:search) do
    Post.ransack(params[:q])
  end

  it 'should have filters' do
    expect(subject.filters.size).to eq(1)
  end

end

Version data entries

19 entries across 19 versions & 4 rubygems

Version Path
activeadmin-rails-1.7.1 spec/unit/filters/active_spec.rb
activeadmin-rails-1.7.0 spec/unit/filters/active_spec.rb
activeadmin-rb-1.6.0 spec/unit/filters/active_spec.rb
activeadmin-rb-1.5.2 spec/unit/filters/active_spec.rb
activeadmin-rb-1.5.1 spec/unit/filters/active_spec.rb
activeadmin-rb-1.5.0 spec/unit/filters/active_spec.rb
activeadmin_addons-1.7.1 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-f71b375325eb/spec/unit/filters/active_spec.rb
activeadmin-rb-1.4.0 spec/unit/filters/active_spec.rb
activeadmin_addons-1.7.0 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-f71b375325eb/spec/unit/filters/active_spec.rb
activeadmin-1.3.1 spec/unit/filters/active_spec.rb
activeadmin_addons-1.6.0 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-f71b375325eb/spec/unit/filters/active_spec.rb
activeadmin_addons-1.5.0 vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-f71b375325eb/spec/unit/filters/active_spec.rb
activeadmin-1.3.0 spec/unit/filters/active_spec.rb
activeadmin_addons-1.4.0 vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-f71b375325eb/spec/unit/filters/active_spec.rb
activeadmin_addons-1.3.0 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-f71b375325eb/spec/unit/filters/active_spec.rb
activeadmin_addons-1.2.0 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-f71b375325eb/spec/unit/filters/active_spec.rb
activeadmin-1.2.1 spec/unit/filters/active_spec.rb
activeadmin-1.2.0 spec/unit/filters/active_spec.rb
activeadmin-1.1.0 spec/unit/filters/active_spec.rb