Sha256: e53f12dfb5729ed2a681536fe564922e2a9d38083eb3de825c04dbb603d7f491

Contents?: true

Size: 802 Bytes

Versions: 10

Compression:

Stored size: 802 Bytes

Contents

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

class FilterParamMatcherTest < Test::Unit::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

10 entries across 10 versions & 5 rubygems

Version Path
Flamefork-shoulda-2.10.1 test/matchers/controller/filter_param_matcher_test.rb
Flamefork-shoulda-2.10.2 test/matchers/controller/filter_param_matcher_test.rb
francois-shoulda-2.10.1 test/matchers/controller/filter_param_matcher_test.rb
technicalpickles-shoulda-2.10.0 test/matchers/controller/filter_param_matcher_test.rb
thoughtbot-shoulda-2.10.0 test/matchers/controller/filter_param_matcher_test.rb
thoughtbot-shoulda-2.10.1 test/matchers/controller/filter_param_matcher_test.rb
thoughtbot-shoulda-2.9.2 test/matchers/controller/filter_param_matcher_test.rb
shoulda-2.9.2 test/matchers/controller/filter_param_matcher_test.rb
shoulda-2.10.0 test/matchers/controller/filter_param_matcher_test.rb
shoulda-2.10.1 test/matchers/controller/filter_param_matcher_test.rb