summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-11-09 16:05:09 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-11-09 16:05:09 +0000
commitc6b1f52eb5264db9b21aa9789e9067e0ced68248 (patch)
treede7a086e8329a96f00c20e255fb00ac872538a9b /test
parentfb84731bcdc8ebb9c42c2e5b30b403ae5065da31 (diff)
downloadredmine-c6b1f52eb5264db9b21aa9789e9067e0ced68248.tar.gz
redmine-c6b1f52eb5264db9b21aa9789e9067e0ced68248.zip
cleanup: rubocop: fix Layout/AlignArguments in test/integration/api_test/issue_categories_test.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@19029 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/integration/api_test/issue_categories_test.rb25
1 files changed, 15 insertions, 10 deletions
diff --git a/test/integration/api_test/issue_categories_test.rb b/test/integration/api_test/issue_categories_test.rb
index da9cd6d20..52dae6dba 100644
--- a/test/integration/api_test/issue_categories_test.rb
+++ b/test/integration/api_test/issue_categories_test.rb
@@ -42,9 +42,10 @@ class Redmine::ApiTest::IssueCategoriesTest < Redmine::ApiTest::Base
test "POST /projects/:project_id/issue_categories.xml should return create issue category" do
assert_difference 'IssueCategory.count' do
- post '/projects/1/issue_categories.xml',
+ post(
+ '/projects/1/issue_categories.xml',
:params => {:issue_category => {:name => 'API'}},
- :headers => credentials('jsmith')
+ :headers => credentials('jsmith'))
end
assert_response :created
assert_equal 'application/xml', @response.content_type
@@ -56,9 +57,10 @@ class Redmine::ApiTest::IssueCategoriesTest < Redmine::ApiTest::Base
test "POST /projects/:project_id/issue_categories.xml with invalid parameters should return errors" do
assert_no_difference 'IssueCategory.count' do
- post '/projects/1/issue_categories.xml',
+ post(
+ '/projects/1/issue_categories.xml',
:params => {:issue_category => {:name => ''}},
- :headers => credentials('jsmith')
+ :headers => credentials('jsmith'))
end
assert_response :unprocessable_entity
assert_equal 'application/xml', @response.content_type
@@ -68,9 +70,10 @@ class Redmine::ApiTest::IssueCategoriesTest < Redmine::ApiTest::Base
test "PUT /issue_categories/:id.xml with valid parameters should update the issue category" do
assert_no_difference 'IssueCategory.count' do
- put '/issue_categories/2.xml',
+ put(
+ '/issue_categories/2.xml',
:params => {:issue_category => {:name => 'API Update'}},
- :headers => credentials('jsmith')
+ :headers => credentials('jsmith'))
end
assert_response :no_content
assert_equal '', @response.body
@@ -79,9 +82,10 @@ class Redmine::ApiTest::IssueCategoriesTest < Redmine::ApiTest::Base
test "PUT /issue_categories/:id.xml with invalid parameters should return errors" do
assert_no_difference 'IssueCategory.count' do
- put '/issue_categories/2.xml',
+ put(
+ '/issue_categories/2.xml',
:params => {:issue_category => {:name => ''}},
- :headers => credentials('jsmith')
+ :headers => credentials('jsmith'))
end
assert_response :unprocessable_entity
assert_equal 'application/xml', @response.content_type
@@ -104,9 +108,10 @@ class Redmine::ApiTest::IssueCategoriesTest < Redmine::ApiTest::Base
assert_difference 'IssueCategory.count', -1 do
assert_difference 'Issue.where(:category_id => 2).count', 3 do
- delete '/issue_categories/1.xml',
+ delete(
+ '/issue_categories/1.xml',
:params => {:reassign_to_id => 2},
- :headers => credentials('jsmith')
+ :headers => credentials('jsmith'))
end
end
assert_response :no_content