summaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/project_test.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/unit/project_test.rb b/test/unit/project_test.rb
index 9114a06..e61fe31 100644
--- a/test/unit/project_test.rb
+++ b/test/unit/project_test.rb
@@ -213,10 +213,16 @@ class ProjectTest < ActiveSupport::TestCase
assert_equal groups(:team_thunderbird), p.owner
end
- should "add group as committer to mainline repositories when changing ownership" do
+ should "add group as admin to mainline repositories when changing ownership" do
p = projects(:johans)
assert_difference("Committership.count") { p.change_owner_to(groups(:team_thunderbird)) }
- assert p.repositories.mainlines.first.committerships.any? {|c| c.committer == groups(:team_thunderbird) }
+ committership = p.repositories.mainlines.first.committerships.detect { |c|
+ c.committer == groups(:team_thunderbird)
+ }
+ assert_not_nil committership
+ assert_equal(
+ Committership::CAN_REVIEW | Committership::CAN_COMMIT | Committership::CAN_ADMIN,
+ committership.permissions)
end
should "delegate wiki permissions to the wiki repository" do