lib/popcorn: fix file inclusion for Jenkins tests
authorAlexandre Terrasa <alexandre@moz-code.org>
Wed, 17 May 2017 13:49:13 +0000 (09:49 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Wed, 17 May 2017 13:49:46 +0000 (09:49 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

lib/popcorn/examples/angular/tests/test_example_angular.nit
lib/popcorn/examples/static_files/tests/test_example_static.nit
lib/popcorn/examples/static_files/tests/test_example_static_default.nit
lib/popcorn/examples/static_files/tests/test_example_static_multiple.nit

index 641b3bd..7c6fa1d 100644 (file)
@@ -32,7 +32,7 @@ class TestExampleAngular
        fun test_example_angular do
                var app = new App
                app.use("/counter", new CounterAPI)
-               app.use("/*", new StaticHandler("examples/angular/www/", "index.html"))
+               app.use("/*", new StaticHandler(test_path / "../www/", "index.html"))
                run_test(app)
        end
 end
index d1b5977..a1c26a9 100644 (file)
@@ -34,7 +34,7 @@ class TestExampleStatic
 
        fun test_example_static do
                var app = new App
-               app.use("/", new StaticHandler("examples/static_files/public/"))
+               app.use("/", new StaticHandler(test_path / "../public/"))
                run_test(app)
        end
 end
index ee7bb99..30ef93e 100644 (file)
@@ -34,7 +34,7 @@ class TestExampleStaticDefault
 
        fun test_example_static_default do
                var app = new App
-               app.use("/", new StaticHandler("examples/static_files/public/", "default.html"))
+               app.use("/", new StaticHandler(test_path / "../public/", "default.html"))
                run_test(app)
        end
 end
index 430b4ae..42fc7df 100644 (file)
@@ -38,10 +38,10 @@ class TestExampleStaticMultiple
 
        fun test_example_static_multiple do
                var app = new App
-               app.use("/", new StaticHandler("examples/static_files/public/"))
-               app.use("/", new StaticHandler("examples/static_files/files/"))
-               app.use("/static", new StaticHandler("examples/static_files/public/"))
-               app.use("/static", new StaticHandler("examples/static_files/files/"))
+               app.use("/", new StaticHandler(test_path / "../public/"))
+               app.use("/", new StaticHandler(test_path / "../files/"))
+               app.use("/static", new StaticHandler(test_path / "../public/"))
+               app.use("/static", new StaticHandler(test_path / "../files/"))
                run_test(app)
        end
 end