Fixed: invalid SQL query on User#destroy (#1781).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1755 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-08-25 11:55:40 +00:00
parent 5ef0af6710
commit 6fc62d393c
2 changed files with 8 additions and 1 deletions

View File

@@ -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