diff options
author | Go MAEDA <maeda@farend.jp> | 2020-05-15 23:16:50 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2020-05-15 23:16:50 +0000 |
commit | 0532a1b436bca9e9b9923d56791820cfb58e40f7 (patch) | |
tree | e09767919a64ba8ad7bd031c8e3d39a8c1af233f /test | |
parent | 117ad7e4c2cf380f86167c59c6c8e2d36409c325 (diff) | |
download | redmine-0532a1b436bca9e9b9923d56791820cfb58e40f7.tar.gz redmine-0532a1b436bca9e9b9923d56791820cfb58e40f7.zip |
Merged r19777 from trunk to 4.1-stable (#33417).
git-svn-id: http://svn.redmine.org/redmine/branches/4.1-stable@19779 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/integration/api_test/issues_test.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/integration/api_test/issues_test.rb b/test/integration/api_test/issues_test.rb index 59a062b3a..19b1a5c56 100644 --- a/test/integration/api_test/issues_test.rb +++ b/test/integration/api_test/issues_test.rb @@ -653,6 +653,34 @@ class Redmine::ApiTest::IssuesTest < Redmine::ApiTest::Base assert_response 422 end + test "POST /issues.json with invalid project_id and any assigned_to_id should respond with 422" do + post( + '/issues.json', + :params => { + :issue => { + :project_id => 999, + :assigned_to_id => 1, + :subject => 'API' + } + }, + :headers => credentials('jsmith')) + assert_response 422 + end + + test "POST /issues.json with invalid project_id and any fixed_version_id should respond with 422" do + post( + '/issues.json', + :params => { + :issue => { + :project_id => 999, + :fixed_version_id => 1, + :subject => 'API' + } + }, + :headers => credentials('jsmith')) + assert_response 422 + end + test "PUT /issues/:id.xml" do assert_difference('Journal.count') do put( |