Radsaggi/BetLiMS — pull request #14 by Radsaggi (2014-04-07 19:56:54+00:00)
Title: Unit test stage 1 

Added basic Unit Testing framework with the following classes
1) BetLiMSSpec
1.1 withInMemoryDatabase { db => ... } construct
This can be used for an in-memory database that can be used for testing the SlickDatabaseService implementation of DatabaseService trait. Look at SlickInjectedDatabase type defined in the class.
1.2 withMockDatabase { (db, app) => ... } construct
This can be used for testing the controller. app is basically a constroller injected with a mock of DatabaseService trait. Modify the db mock object as per the requirements and call appropriate functions on the app(controller) object.
2) ApplicationSpec
1.1 BetLiMS application should send status 404 for url
dummy links that should not resolve
1.2 render the * page for GET url *
check the rendering of each page returned for url / route defined in the controller.
1.3 cater to the * submission
check the redirection for form submission routes