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