Merge: doc: fixed some typos and other misc. corrections
[nit.git] / src / doc / commands / tests / test_commands_http.nit
index b009b7f..1f51238 100644 (file)
@@ -45,7 +45,7 @@ class TestCommandsHttp
        end
 
        fun test_cmd_http_entity_not_found is test do
-               var req = new_request("/Characterzzz")
+               var req = new_request("/Characterz")
                var cmd = new CmdEntity(test_model)
                var res = cmd.http_init(req)
                assert res isa ErrorMEntityNotFound
@@ -157,6 +157,14 @@ class TestCommandsHttp
                assert cmd.results.as(not null).length == 0
        end
 
+       fun test_cmd_http_ancestors_with_filter_match is test do
+               var req = new_request("/test_prog::Warrior?match=Object")
+               var cmd = new CmdAncestors(test_model, test_main)
+               var res = cmd.http_init(req)
+               assert res isa CmdSuccess
+               assert cmd.results.as(not null).length == 1
+       end
+
        # CmdSearch
 
        fun test_cmd_http_search is test do
@@ -192,6 +200,14 @@ class TestCommandsHttp
                assert res isa WarningNoFeatures
        end
 
+       fun test_cmd_http_features_with_filter_inherited is test do
+               var req = new_request("/test_prog::TestGame?inherited=TestGame")
+               var cmd = new CmdFeatures(test_model)
+               var res = cmd.http_init(req)
+               assert res isa CmdSuccess
+               assert cmd.results.as(not null).length == 4
+       end
+
        # CmdLinearization
 
        fun test_cmd_http_lin is test do
@@ -199,7 +215,7 @@ class TestCommandsHttp
                var cmd = new CmdLinearization(test_model, test_main)
                var res = cmd.http_init(req)
                assert res isa CmdSuccess
-               assert cmd.results.as(not null).length == 10
+               assert cmd.results.as(not null).length == 9
        end
 
        fun test_cmd_http_lin_no_lin is test do