From 47aded820d6cd27af4db583516963f8433db450f Mon Sep 17 00:00:00 2001 From: James Cole Date: Thu, 15 Dec 2016 08:53:10 +0100 Subject: [PATCH] New test. --- .../Controllers/HelpControllerTest.php | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/tests/acceptance/Controllers/HelpControllerTest.php b/tests/acceptance/Controllers/HelpControllerTest.php index f005ea4ff6..9acadb6482 100644 --- a/tests/acceptance/Controllers/HelpControllerTest.php +++ b/tests/acceptance/Controllers/HelpControllerTest.php @@ -8,6 +8,7 @@ * * See the LICENSE file for details. */ +use FireflyIII\Helpers\Help\HelpInterface; /** @@ -28,21 +29,17 @@ class HelpControllerTest extends TestCase /** * @covers \FireflyIII\Http\Controllers\HelpController::show - * Implement testShow(). */ public function testShow() { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } + $help = $this->mock(HelpInterface::class); + $help->shouldReceive('hasRoute')->andReturn(true)->once(); + $help->shouldReceive('inCache')->andReturn(false)->once(); + $help->shouldReceive('getFromGithub')->andReturn('Help content here.')->once(); + $help->shouldReceive('putInCache')->once(); - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { + $this->be($this->user()); + $this->call('GET', route('help.show', ['index'])); + $this->assertResponseStatus(200); } }