summaryrefslogtreecommitdiffstats
path: root/test/integration/api_test/memberships_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/api_test/memberships_test.rb')
-rw-r--r--test/integration/api_test/memberships_test.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/integration/api_test/memberships_test.rb b/test/integration/api_test/memberships_test.rb
index 463ddf9bd..76e0f58ef 100644
--- a/test/integration/api_test/memberships_test.rb
+++ b/test/integration/api_test/memberships_test.rb
@@ -26,7 +26,7 @@ class Redmine::ApiTest::MembershipsTest < Redmine::ApiTest::Base
get '/projects/1/memberships.xml', :headers => credentials('jsmith')
assert_response :success
- assert_equal 'application/xml', @response.content_type
+ assert_equal 'application/xml', @response.media_type
assert_select 'memberships[type=array] membership id', :text => '2' do
assert_select '~ user[id="3"][name="Dave Lopper"]'
assert_select '~ roles role[id="2"][name=Developer]'
@@ -37,7 +37,7 @@ class Redmine::ApiTest::MembershipsTest < Redmine::ApiTest::Base
get '/projects/1/memberships.json', :headers => credentials('jsmith')
assert_response :success
- assert_equal 'application/json', @response.content_type
+ assert_equal 'application/json', @response.media_type
json = ActiveSupport::JSON.decode(response.body)
assert_equal 3, json["total_count"]
assert_equal 25, json["limit"]
@@ -98,7 +98,7 @@ class Redmine::ApiTest::MembershipsTest < Redmine::ApiTest::Base
:headers => credentials('jsmith')
assert_response :unprocessable_entity
- assert_equal 'application/xml', @response.content_type
+ assert_equal 'application/xml', @response.media_type
assert_select 'errors error', :text => "Principal cannot be blank"
end
end
@@ -107,7 +107,7 @@ class Redmine::ApiTest::MembershipsTest < Redmine::ApiTest::Base
get '/memberships/2.xml', :headers => credentials('jsmith')
assert_response :success
- assert_equal 'application/xml', @response.content_type
+ assert_equal 'application/xml', @response.media_type
assert_select 'membership id', :text => '2' do
assert_select '~ user[id="3"][name="Dave Lopper"]'
assert_select '~ roles role[id="2"][name=Developer]'
@@ -118,7 +118,7 @@ class Redmine::ApiTest::MembershipsTest < Redmine::ApiTest::Base
get '/memberships/2.json', :headers => credentials('jsmith')
assert_response :success
- assert_equal 'application/json', @response.content_type
+ assert_equal 'application/json', @response.media_type
json = ActiveSupport::JSON.decode(response.body)
assert_equal(
{"membership" => {
@@ -150,7 +150,7 @@ class Redmine::ApiTest::MembershipsTest < Redmine::ApiTest::Base
:headers => credentials('jsmith')
assert_response :unprocessable_entity
- assert_equal 'application/xml', @response.content_type
+ assert_equal 'application/xml', @response.media_type
assert_select 'errors error', :text => "Role cannot be empty"
end