Project

General

Profile

« Previous | Next » 

Revision 0f7d219a

Added by Daniel Lobato Garcia over 10 years ago

fixes #3960 - wrap APIv2 errors in an "error" node

View differences:

test/functional/api/v2/users_controller_test.rb
assert_response :forbidden
response = ActiveSupport::JSON.decode(@response.body)
assert response['details'] == "You are trying to delete your own account"
assert response['message'] == "Access denied"
assert_equal "You are trying to delete your own account", response['error']['details']
assert_equal "Access denied", response['error']['message']
assert User.exists?(user)
end
end

Also available in: Unified diff