Sha256: de50e005de9cbd9217ceb3f4740cbf55a45906810e6df896cc20f27a649d35bf
Contents?: true
Size: 636 Bytes
Versions: 36
Compression:
Stored size: 636 Bytes
Contents
# frozen_string_literal: true describe Blacklight::Parameters do describe "sanitize_search_params" do subject { described_class.sanitize(params) } context "with nil values" do let(:params) { ActionController::Parameters.new a: nil, b: 1 } it "removes them" do expect(subject).to_not have_key(:a) expect(subject[:b]).to eq 1 end end context "with blacklisted keys" do let(:params) { ActionController::Parameters.new action: true, controller: true, id: true, commit: true, utf8: true } it "removes them" do expect(subject).to be_empty end end end end
Version data entries
36 entries across 36 versions & 1 rubygems