mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-20 03:10:57 +00:00
Improve test coverage.
This commit is contained in:
@@ -35,7 +35,7 @@ use Tests\TestCase;
|
||||
class IsDemoUserTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Middleware\IsDemoUser::handle
|
||||
* @covers \FireflyIII\Http\Middleware\IsDemoUser
|
||||
*/
|
||||
public function testMiddlewareAuthenticated()
|
||||
{
|
||||
@@ -45,9 +45,8 @@ class IsDemoUserTest extends TestCase
|
||||
$this->assertEquals(Response::HTTP_OK, $response->getStatusCode());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Middleware\IsDemoUser::handle
|
||||
* @covers \FireflyIII\Http\Middleware\IsDemoUser
|
||||
*/
|
||||
public function testMiddlewareNotAuthenticated()
|
||||
{
|
||||
@@ -56,6 +55,17 @@ class IsDemoUserTest extends TestCase
|
||||
$this->assertEquals(Response::HTTP_OK, $response->getStatusCode());
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Middleware\IsDemoUser
|
||||
*/
|
||||
public function testMiddlewareIsDemoUser()
|
||||
{
|
||||
$this->be($this->demoUser());
|
||||
$response = $this->get('/_test/is-demo');
|
||||
$this->assertEquals(Response::HTTP_OK, $response->getStatusCode());
|
||||
$response->assertSessionHas('info');
|
||||
}
|
||||
|
||||
/**
|
||||
* Set up test
|
||||
*/
|
||||
|
Reference in New Issue
Block a user