summaryrefslogtreecommitdiffstats
path: root/src/test/scala/optional.scala
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-02-15 16:41:06 -0600
committerJesse Luehrs <doy@tozt.net>2013-02-15 16:41:06 -0600
commit287656ae92ba8a2fc8aaeca6fd4d1a9aba133ec5 (patch)
tree76cb863c14101d3a9887e2dd3f45da856afe8dc8 /src/test/scala/optional.scala
parent6ebf3488f2548a4412937685b7b6b5c0db95263b (diff)
downloadscala-path-router-287656ae92ba8a2fc8aaeca6fd4d1a9aba133ec5.tar.gz
scala-path-router-287656ae92ba8a2fc8aaeca6fd4d1a9aba133ec5.zip
try out a different testing interface
Diffstat (limited to 'src/test/scala/optional.scala')
-rw-r--r--src/test/scala/optional.scala31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/test/scala/optional.scala b/src/test/scala/optional.scala
index 7832ba9..ade237c 100644
--- a/src/test/scala/optional.scala
+++ b/src/test/scala/optional.scala
@@ -1,8 +1,9 @@
import org.scalatest.FunSuite
+import router.test._
import router.Router
-class Optional extends FunSuite with RouterHelpers {
+class Optional extends FunSuite {
val router = new Router[Boolean]
router addRoute (
@@ -28,53 +29,53 @@ class Optional extends FunSuite with RouterHelpers {
)
test ("routes match properly") {
- testRoute(
- router, "people", Map(
+ assert(
+ router matches "people", Map(
"controller" -> "people",
"action" -> "index"
)
)
- testRoute(
- router, "people/new", Map(
+ assert(
+ router matches "people/new", Map(
"controller" -> "people",
"action" -> "new"
)
)
- testRoute(
- router, "people/create", Map(
+ assert(
+ router matches "people/create", Map(
"controller" -> "people",
"action" -> "create"
)
)
- testRoute(
- router, "people/56", Map(
+ assert(
+ router matches "people/56", Map(
"controller" -> "people",
"action" -> "show",
"id" -> "56"
)
)
- testRoute(
- router, "people/56/edit", Map(
+ assert(
+ router matches "people/56/edit", Map(
"controller" -> "people",
"action" -> "edit",
"id" -> "56"
)
)
- testRoute(
- router, "people/56/remove", Map(
+ assert(
+ router matches "people/56/remove", Map(
"controller" -> "people",
"action" -> "remove",
"id" -> "56"
)
)
- testRoute(
- router, "people/56/update", Map(
+ assert(
+ router matches "people/56/update", Map(
"controller" -> "people",
"action" -> "update",
"id" -> "56"