+
+ # Test json
+ get user_preferences_path(:format => "json"), :headers => auth_header
+ assert_response :success
+ assert_equal "application/json", @response.media_type
+
+ js = ActiveSupport::JSON.decode(@response.body)
+ assert_not_nil js
+ assert_equal 2, js["preferences"].count
+ assert_equal user_preference.v, js["preferences"][user_preference.k]