tests: fix tests for doc commands
[nit.git] / src / doc / doc_phases / doc_indexing.nit
index d532d9c..267c746 100644 (file)
@@ -18,6 +18,7 @@ module doc_indexing
 import doc_base
 import html_templates::html_model # FIXME maybe this phase should depend on `html_render`
 private import json::static
+private import json
 
 # Generate the index for then Nitdoc QuickSearch field.
 #
@@ -67,7 +68,7 @@ class IndexingPhase
                var buffer = new Buffer
                tpl.add buffer
                buffer.append "var nitdocQuickSearchRawList="
-               table.append_json buffer
+               buffer.append table.to_json
                buffer.append ";"
                return tpl
        end
@@ -94,15 +95,11 @@ end
 
 # A QuickSearch result.
 private class QuickSearchResult
-       super Jsonable
+       serialize
 
        # The text of the link.
        var txt: String
 
        # The destination of the link.
        var url: String
-
-       redef fun to_json do
-               return "\{\"txt\":{txt.to_json},\"url\":{url.to_json}\}"
-       end
 end