diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2020-08-09 15:57:04 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2020-08-09 15:57:04 +0000 |
commit | 81020f9d7d472670d9b6ddf2407344cb75b791d5 (patch) | |
tree | 27c781bfc8bd525e3f6609c885a1041d9be9c7d3 | |
parent | 764913632f689c2de27f4a83c83fe66dced7b657 (diff) | |
download | redmine-81020f9d7d472670d9b6ddf2407344cb75b791d5.tar.gz redmine-81020f9d7d472670d9b6ddf2407344cb75b791d5.zip |
fix source indent of test/integration/api_test/groups_test.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@19967 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | test/integration/api_test/groups_test.rb | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/test/integration/api_test/groups_test.rb b/test/integration/api_test/groups_test.rb index 414fa48fc..34d7af1b9 100644 --- a/test/integration/api_test/groups_test.rb +++ b/test/integration/api_test/groups_test.rb @@ -124,9 +124,11 @@ class Redmine::ApiTest::GroupsTest < Redmine::ApiTest::Base test "POST /groups.xml with valid parameters should create the group" do assert_difference('Group.count') do - post '/groups.xml', + post( + '/groups.xml', :params => {:group => {:name => 'Test', :user_ids => [2, 3]}}, :headers => credentials('admin') + ) assert_response :created assert_equal 'application/xml', response.media_type end @@ -142,9 +144,11 @@ class Redmine::ApiTest::GroupsTest < Redmine::ApiTest::Base test "POST /groups.xml with invalid parameters should return errors" do assert_no_difference('Group.count') do - post '/groups.xml', + post( + '/groups.xml', :params => {:group => {:name => ''}}, :headers => credentials('admin') + ) end assert_response :unprocessable_entity assert_equal 'application/xml', response.media_type @@ -156,9 +160,11 @@ class Redmine::ApiTest::GroupsTest < Redmine::ApiTest::Base test "PUT /groups/:id.xml with valid parameters should update the group" do group = Group.generate! - put "/groups/#{group.id}.xml", + put( + "/groups/#{group.id}.xml", :params => {:group => {:name => 'New name', :user_ids => [2, 3]}}, :headers => credentials('admin') + ) assert_response :no_content assert_equal '', @response.body @@ -168,9 +174,11 @@ class Redmine::ApiTest::GroupsTest < Redmine::ApiTest::Base test "PUT /groups/:id.xml with invalid parameters should return errors" do group = Group.generate! - put "/groups/#{group.id}.xml", + put( + "/groups/#{group.id}.xml", :params => {:group => {:name => ''}}, :headers => credentials('admin') + ) assert_response :unprocessable_entity assert_equal 'application/xml', response.media_type @@ -191,9 +199,11 @@ class Redmine::ApiTest::GroupsTest < Redmine::ApiTest::Base test "POST /groups/:id/users.xml should add user to the group" do group = Group.generate! assert_difference 'group.reload.users.count' do - post "/groups/#{group.id}/users.xml", + post( + "/groups/#{group.id}/users.xml", :params => {:user_id => 5}, :headers => credentials('admin') + ) assert_response :no_content assert_equal '', @response.body end @@ -205,9 +215,11 @@ class Redmine::ApiTest::GroupsTest < Redmine::ApiTest::Base group.users << User.find(5) assert_no_difference 'group.reload.users.count' do - post "/groups/#{group.id}/users.xml", + post( + "/groups/#{group.id}/users.xml", :params => {:user_id => 5}, :headers => credentials('admin') + ) assert_response :unprocessable_entity end |