+
+ # check that a visible user is returned properly in json
+ get api_user_path(:id => user.id, :format => "json")
+ assert_response :success
+ assert_equal "application/json", response.media_type
+
+ js = ActiveSupport::JSON.decode(@response.body)
+ assert_not_nil js
+ assert_equal user.id, js["user"]["id"]