mirror of
https://github.com/cydrobolt/polr.git
synced 2024-09-19 15:11:40 +02:00
Create unit test if request not exist should redirect to specified URL
This commit is contained in:
parent
5edaf41346
commit
05ae56e8ee
@ -24,5 +24,7 @@
|
||||
<env name="CACHE_DRIVER" value="array"/>
|
||||
<env name="SESSION_DRIVER" value="array"/>
|
||||
<env name="QUEUE_DRIVER" value="sync"/>
|
||||
<env name="SETTING_REDIRECT_URL_NOT_EXIST" value="true"/>
|
||||
<env name="SETTING_NOT_EXIST_REDIRECT" value="http://redirect.polr.me/"/>
|
||||
</php>
|
||||
</phpunit>
|
||||
|
@ -14,4 +14,10 @@ class IndexTest extends TestCase
|
||||
->see('>Sign In</a>') // Ensure log in buttons are shown when user is logged out
|
||||
->dontSee('SQLSTATE'); // Ensure database connection is correct
|
||||
}
|
||||
|
||||
public function testRequestGetNotExistShortUrl() {
|
||||
$response = $this->call('GET', '/notexist');
|
||||
$this->assertTrue($response->isRedirection());
|
||||
$this->assertRedirectedTo(env('SETTING_NOT_EXIST_REDIRECT'));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user