Fixed: when bulk editing, setting "Assigned to" to "nobody" causes an sql error with Postgresql (#935).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1294 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-03-26 22:22:45 +00:00
parent 805864590a
commit d37a30846f
3 changed files with 21 additions and 7 deletions

View File

@@ -339,6 +339,16 @@ class IssuesControllerTest < Test::Unit::TestCase
assert_equal 'Bulk editing', Issue.find(1).journals.find(:first, :order => 'created_on DESC').notes
end
def test_bulk_unassign
assert_not_nil Issue.find(2).assigned_to
@request.session[:user_id] = 2
# unassign issues
post :bulk_edit, :ids => [1, 2], :notes => 'Bulk unassigning', :assigned_to_id => 'none'
assert_response 302
# check that the issues were updated
assert_nil Issue.find(2).assigned_to
end
def test_move_one_issue_to_another_project
@request.session[:user_id] = 1
post :move, :id => 1, :new_project_id => 2