public function testIndexFail() { PostRepository::shouldReceive('find')->once()->with(1, ['id']); $content = $this->call('GET', 'blog/posts/1/comments', [], [], [], ['HTTP_X_REQUESTED_WITH' => 'XMLHttpRequest'])->getContent(); $this->assertResponseStatus(404); $this->assertEquals('{"success":false,"code":404,"msg":"The post you were viewing has been deleted.","url":"http:\\/\\/localhost\\/blog\\/posts"}', $content); }
public function testIndexFail() { PostRepository::shouldReceive('find')->once()->with(1, ['id']); $this->get('blog/posts/1/comments'); $this->assertEquals(404, $this->response->status()); }