Sha256: 9d1e7adb6130c080ee51eb9dbff2fc1f1d42c69d859790f5a9d1fc2a5bebca37
Contents?: true
Size: 644 Bytes
Versions: 51
Compression:
Stored size: 644 Bytes
Contents
# frozen_string_literal: true RSpec.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).not_to 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
51 entries across 51 versions & 1 rubygems