+
+ # Test json
+ get permissions_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 ClientApplication.all_permissions.size, js["permissions"].count
+ ClientApplication.all_permissions.each do |p|
+ assert_includes js["permissions"], p.to_s
+ end