Make sure the attachment tests work.

This commit is contained in:
James Cole
2016-12-25 12:23:36 +01:00
parent 0ef9b5b462
commit 7894f1871e
4 changed files with 57 additions and 9 deletions

View File

@@ -58,6 +58,10 @@ class AttachmentControllerTest extends TestCase
*/
public function testDownload()
{
$repository = $this->mock(AttachmentRepositoryInterface::class);
$repository->shouldReceive('exists')->once()->andReturn(true);
$repository->shouldReceive('getContent')->once()->andReturn('This is attachment number one.');
$this->be($this->user());
$this->call('GET', route('attachments.download', [1]));
$this->assertResponseStatus(200);