Sha256: 3d9a4e7914efabd3a0a9a5f9abb6adcd9b0bd8a2ddf9f0836bae1585bdaf9b1a
Contents?: true
Size: 593 Bytes
Versions: 28
Compression:
Stored size: 593 Bytes
Contents
require 'spec_helper' describe Shoulda::Matchers::ActionController::FilterParamMatcher do context "given parameter filters" do before do Rails.application.config.filter_parameters = [:secret] end it "should accept filtering that parameter" do nil.should filter_param(:secret) end it "should reject filtering another parameter" do matcher = filter_param(:other) matcher.matches?(nil).should be_false matcher.failure_message.should include("Expected other to be filtered") matcher.failure_message.should =~ /secret/ end end end
Version data entries
28 entries across 20 versions & 4 rubygems