Sha256: 377caa3818375e6f91685924567501cdbc68a1c5dcbce61afcc4f9d87d4ac6de

Contents?: true

Size: 808 Bytes

Versions: 38

Compression:

Stored size: 808 Bytes

Contents

require File.join(File.dirname(__FILE__), '..', '..', 'test_helper')

class FilterParamMatcherTest < ActionController::TestCase # :nodoc:

  context "a controller that filters no parameters" do
    setup do
      @controller = define_controller(:examples).new
    end

    should "reject filtering any parameter" do
      assert_rejects filter_param(:any), @controller
    end
  end

  context "a controller that filters a parameter" do
    setup do
      @controller = define_controller :examples do
        filter_parameter_logging :password
      end.new
    end

    should "accept filtering that parameter" do
      assert_accepts filter_param(:password), @controller
    end

    should "reject filtering another parameter" do
      assert_rejects filter_param(:other), @controller
    end
  end

end

Version data entries

38 entries across 38 versions & 10 rubygems

Version Path
auser-poolparty-1.3.0 vendor/gems/shoulda/test/matchers/controller/filter_param_matcher_test.rb
auser-poolparty-1.3.1 vendor/gems/shoulda/test/matchers/controller/filter_param_matcher_test.rb
auser-poolparty-1.3.10 vendor/gems/shoulda/test/matchers/controller/filter_param_matcher_test.rb
auser-poolparty-1.3.11 vendor/gems/shoulda/test/matchers/controller/filter_param_matcher_test.rb
auser-poolparty-1.3.12 vendor/gems/shoulda/test/matchers/controller/filter_param_matcher_test.rb
auser-poolparty-1.3.13 vendor/gems/shoulda/test/matchers/controller/filter_param_matcher_test.rb
auser-poolparty-1.3.14 vendor/gems/shoulda/test/matchers/controller/filter_param_matcher_test.rb
auser-poolparty-1.3.15 vendor/gems/shoulda/test/matchers/controller/filter_param_matcher_test.rb
auser-poolparty-1.3.16 vendor/gems/shoulda/test/matchers/controller/filter_param_matcher_test.rb
auser-poolparty-1.3.17 vendor/gems/shoulda/test/matchers/controller/filter_param_matcher_test.rb
auser-poolparty-1.3.2 vendor/gems/shoulda/test/matchers/controller/filter_param_matcher_test.rb
auser-poolparty-1.3.3 vendor/gems/shoulda/test/matchers/controller/filter_param_matcher_test.rb
auser-poolparty-1.3.4 vendor/gems/shoulda/test/matchers/controller/filter_param_matcher_test.rb
auser-poolparty-1.3.5 vendor/gems/shoulda/test/matchers/controller/filter_param_matcher_test.rb
auser-poolparty-1.3.6 vendor/gems/shoulda/test/matchers/controller/filter_param_matcher_test.rb
auser-poolparty-1.3.7 vendor/gems/shoulda/test/matchers/controller/filter_param_matcher_test.rb
auser-poolparty-1.3.8 vendor/gems/shoulda/test/matchers/controller/filter_param_matcher_test.rb
fairchild-poolparty-1.3.17 vendor/gems/shoulda/test/matchers/controller/filter_param_matcher_test.rb
fairchild-poolparty-1.3.5 vendor/gems/shoulda/test/matchers/controller/filter_param_matcher_test.rb
iGEL-shoulda-2.10.2 test/matchers/controller/filter_param_matcher_test.rb