summaryrefslogtreecommitdiff
path: root/example/todo
diff options
context:
space:
mode:
Diffstat (limited to 'example/todo')
-rw-r--r--example/todo/app/src/TodoServer.scala2
-rw-r--r--example/todo/app/test/src/ExampleTests.scala4
-rw-r--r--example/todo/build.sc2
3 files changed, 4 insertions, 4 deletions
diff --git a/example/todo/app/src/TodoServer.scala b/example/todo/app/src/TodoServer.scala
index 4adb55c..1a58d09 100644
--- a/example/todo/app/src/TodoServer.scala
+++ b/example/todo/app/src/TodoServer.scala
@@ -17,7 +17,7 @@ object TodoServer extends cask.MainRoutes{
class transactional extends cask.Decorator{
class TransactionFailed(val value: Router.Result.Error) extends Exception
- def wrapFunction(pctx: cask.Request, delegate: Delegate): Returned = {
+ def wrapFunction(pctx: cask.Request, delegate: Delegate): OuterReturned = {
try ctx.transaction(
delegate(Map()) match{
case Router.Result.Success(t) => Router.Result.Success(t)
diff --git a/example/todo/app/test/src/ExampleTests.scala b/example/todo/app/test/src/ExampleTests.scala
index e8ca7eb..e1be23c 100644
--- a/example/todo/app/test/src/ExampleTests.scala
+++ b/example/todo/app/test/src/ExampleTests.scala
@@ -1,7 +1,7 @@
package app
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 = io.undertow.Undertow.builder
.addHttpListener(8080, "localhost")
.setHandler(example.defaultHandler)
@@ -13,7 +13,7 @@ object ExampleTests extends TestSuite{
res
}
val tests = Tests{
- 'TodoServer - test(TodoServer){ host =>
+ test("TodoServer") - withServer(TodoServer){ host =>
val page = requests.get(host).text()
assert(page.contains("What needs to be done?"))
}
diff --git a/example/todo/build.sc b/example/todo/build.sc
index beeb947..c5d5610 100644
--- a/example/todo/build.sc
+++ b/example/todo/build.sc
@@ -13,7 +13,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",
)
}