diff options
author | Johan Sørensen <johan@johansorensen.com> | 2009-12-10 12:36:35 +0100 |
---|---|---|
committer | Johan Sørensen <johan@johansorensen.com> | 2009-12-10 12:36:35 +0100 |
commit | 61cfb16a75e65f085cd3480fe954472e63c0d207 (patch) | |
tree | 52028d263b3d9d8411fb1af2122970b819b01f58 /test/unit/committership_test.rb | |
parent | 631eeaa618b9cd9f2b13b8c6aac922c85e6ed3b2 (diff) | |
download | gitorious-mainline-outdated-61cfb16a75e65f085cd3480fe954472e63c0d207.zip gitorious-mainline-outdated-61cfb16a75e65f085cd3480fe954472e63c0d207.tar.gz gitorious-mainline-outdated-61cfb16a75e65f085cd3480fe954472e63c0d207.tar.bz2 |
Don't attempt to create a committership delete event when deleting a user
Diffstat (limited to 'test/unit/committership_test.rb')
-rw-r--r-- | test/unit/committership_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/unit/committership_test.rb b/test/unit/committership_test.rb index b69283e..28a3e0e 100644 --- a/test/unit/committership_test.rb +++ b/test/unit/committership_test.rb @@ -234,4 +234,14 @@ class CommittershipTest < ActiveSupport::TestCase assert_equal [:commit, :review], @cs.permission_list.sort_by(&:to_s) end end + + should "explode on destroy if there's no repository" do + # The repository will be gone if we're deleting the + # user/repository and it cascades down to the committership + cs = new_committership + cs.save! + assert_nothing_raised(NoMethodError) do + cs.repository.user.destroy + end + end end |