summaryrefslogtreecommitdiffstats
path: root/test/unit/committership_test.rb
diff options
context:
space:
mode:
authorJohan Sørensen <johan@johansorensen.com>2009-02-18 15:54:34 +0100
committerJohan Sørensen <johan@johansorensen.com>2009-04-22 15:14:29 +0200
commit78e8dfe12131b99627ff55268794070d25ed6d10 (patch)
tree3af72ab907f192012bac3a7179a08927466cb03b /test/unit/committership_test.rb
parent74b4c751c7eddfcb2ee7fca4c79d23aaf953bdd8 (diff)
downloadgitorious-mainline-outdated-78e8dfe12131b99627ff55268794070d25ed6d10.zip
gitorious-mainline-outdated-78e8dfe12131b99627ff55268794070d25ed6d10.tar.gz
gitorious-mainline-outdated-78e8dfe12131b99627ff55268794070d25ed6d10.tar.bz2
Clicking the "manage committers" link on a repository takes them to the
committerships page
Diffstat (limited to 'test/unit/committership_test.rb')
-rw-r--r--test/unit/committership_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/unit/committership_test.rb b/test/unit/committership_test.rb
index 55f830c..b7214dc 100644
--- a/test/unit/committership_test.rb
+++ b/test/unit/committership_test.rb
@@ -46,6 +46,16 @@ class CommittershipTest < ActiveSupport::TestCase
assert_equal groups(:team_thunderbird).members, c.members
end
+ should "have a named scope for only getting groups" do
+ c1 = new_committership(:committer => groups(:team_thunderbird))
+ c2 = new_committership(:committer => users(:johan))
+ [c1, c2].each(&:save)
+ repo = repositories(:johans)
+
+ assert_equal [c1], repo.committerships.groups
+ assert_equal [c2], repo.committerships.users
+ end
+
def new_committership(opts = {})
Committership.new({
:repository => repositories(:johans),