mirror of
https://github.com/redmine/redmine.git
synced 2025-11-13 00:36:01 +01:00
API: creating an issue with an invalid project_id should return 422 instead of 403 (#19276).
git-svn-id: http://svn.redmine.org/redmine/trunk@14141 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -444,6 +444,11 @@ JSON
|
||||
assert json['errors'].include?("Subject cannot be blank")
|
||||
end
|
||||
|
||||
test "POST /issues.json with invalid project_id should respond with 422" do
|
||||
post '/issues.json', {:issue => {:project_id => 999, :subject => "API"}}, credentials('jsmith')
|
||||
assert_response 422
|
||||
end
|
||||
|
||||
test "PUT /issues/:id.xml" do
|
||||
assert_difference('Journal.count') do
|
||||
put '/issues/6.xml',
|
||||
|
||||
Reference in New Issue
Block a user