diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-07-14 08:13:55 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-07-14 08:13:55 +0000 |
commit | 18f693f9f7c1ff0a32ddda9b6ea43a4bb1fe28e1 (patch) | |
tree | 7b5be61fb040bb64bdaff1726a746fe82e149810 /test/integration | |
parent | 6bf60e8c206b3c75d18c824cb8b98b10a6d6a69c (diff) | |
download | redmine-18f693f9f7c1ff0a32ddda9b6ea43a4bb1fe28e1.tar.gz redmine-18f693f9f7c1ff0a32ddda9b6ea43a4bb1fe28e1.zip |
Fixed that 200 API responses have a body containing one space (#11388).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9975 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration')
-rw-r--r-- | test/integration/api_test/groups_test.rb | 4 | ||||
-rw-r--r-- | test/integration/api_test/issue_categories_test.rb | 3 | ||||
-rw-r--r-- | test/integration/api_test/issue_relations_test.rb | 1 | ||||
-rw-r--r-- | test/integration/api_test/issues_test.rb | 1 | ||||
-rw-r--r-- | test/integration/api_test/memberships_test.rb | 2 | ||||
-rw-r--r-- | test/integration/api_test/projects_test.rb | 4 | ||||
-rw-r--r-- | test/integration/api_test/time_entries_test.rb | 2 | ||||
-rw-r--r-- | test/integration/api_test/users_test.rb | 4 | ||||
-rw-r--r-- | test/integration/api_test/versions_test.rb | 2 |
9 files changed, 23 insertions, 0 deletions
diff --git a/test/integration/api_test/groups_test.rb b/test/integration/api_test/groups_test.rb index 9fbcb02d2..22d1e8b32 100644 --- a/test/integration/api_test/groups_test.rb +++ b/test/integration/api_test/groups_test.rb @@ -148,6 +148,7 @@ class ApiTest::GroupsTest < ActionController::IntegrationTest should "update the group" do put '/groups/10.xml', {:group => {:name => 'New name', :user_ids => [2, 3]}}, credentials('admin') assert_response :ok + assert_equal '', @response.body group = Group.find(10) assert_equal 'New name', group.name @@ -177,6 +178,7 @@ class ApiTest::GroupsTest < ActionController::IntegrationTest assert_difference 'Group.count', -1 do delete '/groups/10.xml', {}, credentials('admin') assert_response :ok + assert_equal '', @response.body end end end @@ -188,6 +190,7 @@ class ApiTest::GroupsTest < ActionController::IntegrationTest assert_difference 'Group.find(10).users.count' do post '/groups/10/users.xml', {:user_id => 5}, credentials('admin') assert_response :ok + assert_equal '', @response.body end assert_include User.find(5), Group.find(10).users end @@ -200,6 +203,7 @@ class ApiTest::GroupsTest < ActionController::IntegrationTest assert_difference 'Group.find(10).users.count', -1 do delete '/groups/10/users/8.xml', {}, credentials('admin') assert_response :ok + assert_equal '', @response.body end assert_not_include User.find(8), Group.find(10).users end diff --git a/test/integration/api_test/issue_categories_test.rb b/test/integration/api_test/issue_categories_test.rb index 8cf707426..acc13edf6 100644 --- a/test/integration/api_test/issue_categories_test.rb +++ b/test/integration/api_test/issue_categories_test.rb @@ -81,6 +81,7 @@ class ApiTest::IssueCategoriesTest < ActionController::IntegrationTest put '/issue_categories/2.xml', {:issue_category => {:name => 'API Update'}}, credentials('jsmith') end assert_response :ok + assert_equal '', @response.body assert_equal 'API Update', IssueCategory.find(2).name end end @@ -104,6 +105,7 @@ class ApiTest::IssueCategoriesTest < ActionController::IntegrationTest delete '/issue_categories/1.xml', {}, credentials('jsmith') end assert_response :ok + assert_equal '', @response.body assert_nil IssueCategory.find_by_id(1) end @@ -117,6 +119,7 @@ class ApiTest::IssueCategoriesTest < ActionController::IntegrationTest end end assert_response :ok + assert_equal '', @response.body assert_nil IssueCategory.find_by_id(1) end end diff --git a/test/integration/api_test/issue_relations_test.rb b/test/integration/api_test/issue_relations_test.rb index 0976facef..9c5ece335 100644 --- a/test/integration/api_test/issue_relations_test.rb +++ b/test/integration/api_test/issue_relations_test.rb @@ -99,6 +99,7 @@ class ApiTest::IssueRelationsTest < ActionController::IntegrationTest end assert_response :ok + assert_equal '', @response.body assert_nil IssueRelation.find_by_id(2) end end diff --git a/test/integration/api_test/issues_test.rb b/test/integration/api_test/issues_test.rb index 9dece8354..9b25bc178 100644 --- a/test/integration/api_test/issues_test.rb +++ b/test/integration/api_test/issues_test.rb @@ -770,6 +770,7 @@ class ApiTest::IssuesTest < ActionController::IntegrationTest {:issue => {:notes => 'Attachment added', :uploads => [{:token => token, :filename => 'test.txt', :content_type => 'text/plain'}]}}, credentials('jsmith') assert_response :ok + assert_equal '', @response.body end issue = Issue.find(1) diff --git a/test/integration/api_test/memberships_test.rb b/test/integration/api_test/memberships_test.rb index 0243b3f04..ddd2d4e4c 100644 --- a/test/integration/api_test/memberships_test.rb +++ b/test/integration/api_test/memberships_test.rb @@ -157,6 +157,7 @@ class ApiTest::MembershipsTest < ActionController::IntegrationTest put '/memberships/2.xml', {:membership => {:user_id => 3, :role_ids => [1,2]}}, credentials('jsmith') assert_response :ok + assert_equal '', @response.body end member = Member.find(2) assert_equal [1,2], member.role_ids.sort @@ -179,6 +180,7 @@ class ApiTest::MembershipsTest < ActionController::IntegrationTest delete '/memberships/2.xml', {}, credentials('jsmith') assert_response :ok + assert_equal '', @response.body end assert_nil Member.find_by_id(2) end diff --git a/test/integration/api_test/projects_test.rb b/test/integration/api_test/projects_test.rb index 732d72d46..86e3264e7 100644 --- a/test/integration/api_test/projects_test.rb +++ b/test/integration/api_test/projects_test.rb @@ -226,6 +226,7 @@ class ApiTest::ProjectsTest < ActionController::IntegrationTest put '/projects/2.xml', @parameters, credentials('jsmith') end assert_response :ok + assert_equal '', @response.body assert_equal 'application/xml', @response.content_type project = Project.find(2) assert_equal 'API update', project.name @@ -238,6 +239,7 @@ class ApiTest::ProjectsTest < ActionController::IntegrationTest put '/projects/2.xml', @parameters, credentials('admin') end assert_response :ok + assert_equal '', @response.body project = Project.find(2) assert_equal ['issue_tracking', 'news', 'time_tracking'], project.enabled_module_names.sort end @@ -249,6 +251,7 @@ class ApiTest::ProjectsTest < ActionController::IntegrationTest put '/projects/2.xml', @parameters, credentials('admin') end assert_response :ok + assert_equal '', @response.body project = Project.find(2) assert_equal [1, 3], project.trackers.map(&:id).sort end @@ -286,6 +289,7 @@ class ApiTest::ProjectsTest < ActionController::IntegrationTest delete '/projects/2.xml', {}, credentials('admin') end assert_response :ok + assert_equal '', @response.body assert_nil Project.find_by_id(2) end end diff --git a/test/integration/api_test/time_entries_test.rb b/test/integration/api_test/time_entries_test.rb index b18013496..8e45066ed 100644 --- a/test/integration/api_test/time_entries_test.rb +++ b/test/integration/api_test/time_entries_test.rb @@ -134,6 +134,7 @@ class ApiTest::TimeEntriesTest < ActionController::IntegrationTest put '/time_entries/2.xml', {:time_entry => {:comments => 'API Update'}}, credentials('jsmith') end assert_response :ok + assert_equal '', @response.body assert_equal 'API Update', TimeEntry.find(2).comments end end @@ -157,6 +158,7 @@ class ApiTest::TimeEntriesTest < ActionController::IntegrationTest delete '/time_entries/2.xml', {}, credentials('jsmith') end assert_response :ok + assert_equal '', @response.body assert_nil TimeEntry.find_by_id(2) end end diff --git a/test/integration/api_test/users_test.rb b/test/integration/api_test/users_test.rb index 11f8669bd..926982e1e 100644 --- a/test/integration/api_test/users_test.rb +++ b/test/integration/api_test/users_test.rb @@ -238,6 +238,7 @@ class ApiTest::UsersTest < ActionController::IntegrationTest assert !user.admin? assert_response :ok + assert_equal '', @response.body end end @@ -263,6 +264,7 @@ class ApiTest::UsersTest < ActionController::IntegrationTest assert !user.admin? assert_response :ok + assert_equal '', @response.body end end end @@ -322,6 +324,7 @@ class ApiTest::UsersTest < ActionController::IntegrationTest end assert_response :ok + assert_equal '', @response.body end end @@ -337,6 +340,7 @@ class ApiTest::UsersTest < ActionController::IntegrationTest end assert_response :ok + assert_equal '', @response.body end end end diff --git a/test/integration/api_test/versions_test.rb b/test/integration/api_test/versions_test.rb index da4bcf33d..90b0fb17a 100644 --- a/test/integration/api_test/versions_test.rb +++ b/test/integration/api_test/versions_test.rb @@ -120,6 +120,7 @@ class ApiTest::VersionsTest < ActionController::IntegrationTest put '/versions/2.xml', {:version => {:name => 'API update'}}, credentials('jsmith') assert_response :ok + assert_equal '', @response.body assert_equal 'API update', Version.find(2).name end end @@ -131,6 +132,7 @@ class ApiTest::VersionsTest < ActionController::IntegrationTest end assert_response :ok + assert_equal '', @response.body assert_nil Version.find_by_id(3) end end |