summaryrefslogtreecommitdiffstats
path: root/test/unit/project_members_inheritance_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-11-09 07:51:00 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-11-09 07:51:00 +0000
commit3661766edc1b0e8647e51450b429baa89cbaa5d6 (patch)
treed0b85fe8c70c35cb01531cfbb58c5fa78b1ce30a /test/unit/project_members_inheritance_test.rb
parent71b43ea1c7c1ee9c854bb09bc059cd3a60ca1ddc (diff)
downloadredmine-3661766edc1b0e8647e51450b429baa89cbaa5d6.tar.gz
redmine-3661766edc1b0e8647e51450b429baa89cbaa5d6.zip
Upgrade to Rails 3.2.15.
git-svn-id: http://svn.redmine.org/redmine/trunk@12246 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/project_members_inheritance_test.rb')
-rw-r--r--test/unit/project_members_inheritance_test.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/unit/project_members_inheritance_test.rb b/test/unit/project_members_inheritance_test.rb
index 8cd6486b3..92cc19f46 100644
--- a/test/unit/project_members_inheritance_test.rb
+++ b/test/unit/project_members_inheritance_test.rb
@@ -105,6 +105,7 @@ class ProjectMembersInheritanceTest < ActiveSupport::TestCase
def test_moving_a_subproject_to_another_parent_should_change_inherited_members
other_parent = Project.generate!
other_member = Member.create!(:principal => User.find(4), :project => other_parent, :role_ids => [3])
+ other_member.reload
Project.generate_with_parent!(@parent, :inherit_members => true)
project = Project.order('id desc').first
@@ -157,6 +158,7 @@ class ProjectMembersInheritanceTest < ActiveSupport::TestCase
assert_difference 'Member.count', 2 do
member = Member.create!(:principal => User.find(4), :project => @parent, :role_ids => [1, 3])
+ member.reload
inherited_member = project.memberships.order('id desc').first
assert_equal member.principal, inherited_member.principal
@@ -195,6 +197,7 @@ class ProjectMembersInheritanceTest < ActiveSupport::TestCase
assert_difference 'MemberRole.count', 8 do
member = Member.create!(:principal => group, :project => @parent, :role_ids => [1, 3])
project.reload
+ member.reload
inherited_group_member = project.memberships.detect {|m| m.principal == group}
assert_not_nil inherited_group_member