diff options
author | Untung Ginardi <untung.ginardi@gmail.com> | 2016-09-07 09:56:08 +0300 |
---|---|---|
committer | Untung Ginardi <untung.ginardi@gmail.com> | 2016-09-07 09:56:08 +0300 |
commit | 05ae56e8eee8bb08f683151eb3a32b9e01ec6403 (patch) | |
tree | 33514f6cb50134480062c05df9ad70de4f08493a /tests | |
parent | 5edaf4134690df2733de1b6fcccf2add03a1fa3d (diff) |
Create unit test if request not exist should redirect to specified URL
Diffstat (limited to 'tests')
-rw-r--r-- | tests/IndexTest.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/IndexTest.php b/tests/IndexTest.php index af40015..99b2a91 100644 --- a/tests/IndexTest.php +++ b/tests/IndexTest.php @@ -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')); + } } |