diff -r 01a844d292ac -r 00e2916104fe server/src/tests/Controllers/DocumentListControllerTest.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/src/tests/Controllers/DocumentListControllerTest.php Tue Jun 23 17:01:39 2015 +0200 @@ -0,0 +1,36 @@ +documentRepository = m::mock('CorpusParole\Repositories\DocumentRepository'); + $this->app->instance('CorpusParole\Repositories\DocumentRepository', $this->documentRepository); + } + + public function tearDown() { + m::close(); + parent::tearDown(); + } + + public function testIndex() { + $this->documentRepository->shouldReceive('all')->once()->andReturn(array()); + + $response = $this->call('GET', '/bo/docs'); + + $this->assertResponseOk($response); + $this->assertViewHas('docs'); + } +}