diff options
author | Li Haoyi <haoyi.sg@gmail.com> | 2019-09-14 20:44:03 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-14 20:44:03 +0800 |
commit | dedeed376e1e906ec2eb1574a73f08c24aba47c8 (patch) | |
tree | 337f0528e9284759800228e46f649cbc01f5edfe /example/decorated/app/test | |
parent | 90b6806e5fb91b207f9d8e2da2a58c25928badea (diff) | |
parent | edd1f62ce364f8b559431249e2350c2bb75fccec (diff) | |
download | cask-dedeed376e1e906ec2eb1574a73f08c24aba47c8.tar.gz cask-dedeed376e1e906ec2eb1574a73f08c24aba47c8.tar.bz2 cask-dedeed376e1e906ec2eb1574a73f08c24aba47c8.zip |
Merge pull request #13 from lihaoyi-databricks/wip0.2.3
Upstream some fixes
Diffstat (limited to 'example/decorated/app/test')
-rw-r--r-- | example/decorated/app/test/src/ExampleTests.scala | 4 |
1 files changed, 2 insertions, 2 deletions
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" |