Allows multiple roles on the same project (#706). Prerequisite for user groups feature.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2726 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2009-05-10 10:54:31 +00:00
parent 814e138c2a
commit 7dccf9fda6
65 changed files with 340 additions and 175 deletions
+3 -3
View File
@@ -18,7 +18,7 @@
require File.dirname(__FILE__) + '/../test_helper'
class MessageTest < Test::Unit::TestCase
fixtures :projects, :roles, :members, :boards, :messages, :users, :watchers
fixtures :projects, :roles, :members, :member_roles, :boards, :messages, :users, :watchers
def setup
@board = Board.find(1)
@@ -116,7 +116,7 @@ class MessageTest < Test::Unit::TestCase
author = message.author
assert message.editable_by?(author)
author.role_for_project(message.project).remove_permission!(:edit_own_messages)
author.roles_for_project(message.project).first.remove_permission!(:edit_own_messages)
assert !message.reload.editable_by?(author.reload)
end
@@ -125,7 +125,7 @@ class MessageTest < Test::Unit::TestCase
author = message.author
assert message.destroyable_by?(author)
author.role_for_project(message.project).remove_permission!(:delete_own_messages)
author.roles_for_project(message.project).first.remove_permission!(:delete_own_messages)
assert !message.reload.destroyable_by?(author.reload)
end
end