Enforce issue assignee validation (#23921).

git-svn-id: http://svn.redmine.org/redmine/trunk@16055 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2016-12-10 12:02:37 +00:00
parent 575f4032a2
commit 3a2b6c7c96
8 changed files with 106 additions and 96 deletions

View File

@@ -689,6 +689,14 @@ JSON
assert_select 'errors error', :text => "Subject cannot be blank"
end
test "PUT /issues/:id.xml with invalid assignee should return error" do
user = User.generate!
put '/issues/6.xml', {:issue => {:assigned_to_id => user.id}}, credentials('jsmith')
assert_response :unprocessable_entity
assert_select 'errors error', :text => "Assignee is invalid"
end
test "PUT /issues/:id.json" do
assert_difference('Journal.count') do
put '/issues/6.json',