summaryrefslogtreecommitdiffstats
path: root/test/unit/committership_test.rb
diff options
context:
space:
mode:
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 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