diff options
Diffstat (limited to 'src/test/scala/optional.scala')
-rw-r--r-- | src/test/scala/optional.scala | 31 |
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" |