summaryrefslogtreecommitdiff
path: root/example/todoApi
diff options
context:
space:
mode:
authorLi Haoyi <haoyi.sg@gmail.com>2019-09-14 20:44:03 +0800
committerGitHub <noreply@github.com>2019-09-14 20:44:03 +0800
commitdedeed376e1e906ec2eb1574a73f08c24aba47c8 (patch)
tree337f0528e9284759800228e46f649cbc01f5edfe /example/todoApi
parent90b6806e5fb91b207f9d8e2da2a58c25928badea (diff)
parentedd1f62ce364f8b559431249e2350c2bb75fccec (diff)
downloadcask-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/todoApi')
-rw-r--r--example/todoApi/app/test/src/ExampleTests.scala4
-rw-r--r--example/todoApi/build.sc2
2 files changed, 3 insertions, 3 deletions
diff --git a/example/todoApi/app/test/src/ExampleTests.scala b/example/todoApi/app/test/src/ExampleTests.scala
index 5e9e11a..4e85a8e 100644
--- a/example/todoApi/app/test/src/ExampleTests.scala
+++ b/example/todoApi/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{
- 'TodoMvcApi - test(TodoMvcApi){ host =>
+ test("TodoMvcApi") - withServer(TodoMvcApi){ host =>
requests.get(s"$host/list/all").text() ==>
"""[{"checked":true,"text":"Get started with Cask"},{"checked":false,"text":"Profit!"}]"""
requests.get(s"$host/list/active").text() ==>
diff --git a/example/todoApi/build.sc b/example/todoApi/build.sc
index c0e75a7..e4c2108 100644
--- a/example/todoApi/build.sc
+++ b/example/todoApi/build.sc
@@ -9,7 +9,7 @@ trait AppModule extends ScalaModule{
def testFrameworks = Seq("utest.runner.Framework")
def ivyDeps = Agg(
- ivy"com.lihaoyi::utest::0.6.9",
+ ivy"com.lihaoyi::utest::0.7.1",
ivy"com.lihaoyi::requests::0.2.0",
)
}