From 4e853a9d5b9563dbe1909757bf4be4d8e7d2b36a Mon Sep 17 00:00:00 2001 From: Li Haoyi Date: Sat, 14 Sep 2019 16:45:39 +0800 Subject: . --- example/decorated/app/test/src/ExampleTests.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'example/decorated/app/test') diff --git a/example/decorated/app/test/src/ExampleTests.scala b/example/decorated/app/test/src/ExampleTests.scala index 9aea3bc..c2c19a6 100644 --- a/example/decorated/app/test/src/ExampleTests.scala +++ b/example/decorated/app/test/src/ExampleTests.scala @@ -4,7 +4,7 @@ import io.undertow.Undertow import utest._ object ExampleTests extends TestSuite{ - def test[T](example: cask.main.BaseMain)(f: String => T): T = { + def withServer[T](example: cask.main.BaseMain)(f: String => T): T = { val server = Undertow.builder .addHttpListener(8080, "localhost") .setHandler(example.defaultHandler) @@ -17,7 +17,7 @@ object ExampleTests extends TestSuite{ } val tests = Tests{ - 'Decorated - test(Decorated){ host => + test("Decorated") - withServer(Decorated){ host => requests.get(s"$host/hello/woo").text() ==> "woo31337" requests.get(s"$host/internal/boo").text() ==> "boo[haoyi]" requests.get(s"$host/internal-extra/goo").text() ==> "goo[haoyi]31337" -- cgit v1.2.3