summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-12-21 11:57:01 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-12-21 11:57:01 +0000
commite2998505b2403a70c233cf96fac8432e950bf47d (patch)
tree18246ec1da93cedee557fb7ca5589cd8c79021ae /test
parent8ed791d690cda429c1b411f75d77e94321e1d154 (diff)
downloadredmine-e2998505b2403a70c233cf96fac8432e950bf47d.tar.gz
redmine-e2998505b2403a70c233cf96fac8432e950bf47d.zip
PermissionsAttributeCoder.load called twice when mocha expectation is set.
git-svn-id: http://svn.redmine.org/redmine/trunk@13780 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/unit/role_test.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/unit/role_test.rb b/test/unit/role_test.rb
index 6f9289964..955986609 100644
--- a/test/unit/role_test.rb
+++ b/test/unit/role_test.rb
@@ -57,8 +57,9 @@ class RoleTest < ActiveSupport::TestCase
end
def test_permissions_should_be_unserialized_with_its_coder
- Role::PermissionsAttributeCoder.expects(:load).once
- Role.find(1).permissions
+ Role::PermissionsAttributeCoder.stubs(:load).returns([:foo, :bar])
+ role = Role.find(1)
+ assert_equal [:foo, :bar], role.permissions
end
def test_add_permission