diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-08-25 11:55:40 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-08-25 11:55:40 +0000 |
commit | 6fc62d393cc49986408aa4ef22ddb5f8eb7b34e2 (patch) | |
tree | cf0c809338fbec07ff13575a452842fc3c0febe0 /test | |
parent | 5ef0af67101e66e09119230d374eafee660a1632 (diff) | |
download | redmine-6fc62d393cc49986408aa4ef22ddb5f8eb7b34e2.tar.gz redmine-6fc62d393cc49986408aa4ef22ddb5f8eb7b34e2.zip |
Fixed: invalid SQL query on User#destroy (#1781).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1755 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/user_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb index 3209f261a..80011f4bf 100644 --- a/test/unit/user_test.rb +++ b/test/unit/user_test.rb @@ -57,6 +57,12 @@ class UserTest < Test::Unit::TestCase assert_equal "john", @admin.login end + def test_destroy + User.find(2).destroy + assert_nil User.find_by_id(2) + assert Member.find_all_by_user_id(2).empty? + end + def test_validate @admin.login = "" assert !@admin.save |