Perf: use a custom decoder for Role#permissions instead of YAML.load.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9916 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -44,6 +44,11 @@ class RoleTest < ActiveSupport::TestCase
|
||||
assert_equal 90, target.workflows.size
|
||||
end
|
||||
|
||||
def test_permissions_should_be_unserialized_with_its_coder
|
||||
Role::PermissionsAttributeCoder.expects(:load).once
|
||||
Role.find(1).permissions
|
||||
end
|
||||
|
||||
def test_add_permission
|
||||
role = Role.find(1)
|
||||
size = role.permissions.size
|
||||
|
||||
Reference in New Issue
Block a user