Sha256: 32c5d07c37478d73f79673353bc12eb14788d79fc77e32db25964cc03283e651
Contents?: true
Size: 737 Bytes
Versions: 11
Compression:
Stored size: 737 Bytes
Contents
require 'test_helper' class ParamsBlockArityTest < ActionController::TestCase include DeclarativeAuthorization::Test::Helpers class ParamsBlockArityTestController < ApplicationController end tests ParamsBlockArityTestController access_tests do params :less_than_max_arguments do | one | { this: :works } end params :too_many_arguments do | one, two, three | { what: :ever } end end def test_params_arity assert_raises(InvalidParamsBlockArity) do access_test_params(:too_many_arguments) end assert_equal({ this: :works }, access_test_params(:less_than_max_arguments)) end private def access_test_params_for_param_methods [:old_user, :new_user] end end
Version data entries
11 entries across 11 versions & 1 rubygems