diff --git a/app/Http/Controllers/SinglePageController.php b/app/Http/Controllers/SinglePageController.php index 6a99ad28..3d68b0e8 100644 --- a/app/Http/Controllers/SinglePageController.php +++ b/app/Http/Controllers/SinglePageController.php @@ -15,6 +15,6 @@ public function index() { $appSettings = \Illuminate\Support\Facades\DB::table('options')->pluck('value', 'key')->toJson(); - return view("landing")->with('appSettings', $appSettings);; + return view('landing')->with('appSettings', $appSettings); } } diff --git a/routes/web.php b/routes/web.php index ab6fba72..716dc7d1 100644 --- a/routes/web.php +++ b/routes/web.php @@ -16,4 +16,4 @@ // }); // Route::get('twofaccount/{TwoFAccount}', 'TwoFAccountController@show'); -Route::get('/{any}', 'SinglePageController@index')->where('any', '.*'); \ No newline at end of file +Route::get('/{any}', 'SinglePageController@index')->where('any', '.*')->name('landing'); \ No newline at end of file diff --git a/tests/Unit/RouteTest.php b/tests/Unit/RouteTest.php index 800043bf..e6434185 100644 --- a/tests/Unit/RouteTest.php +++ b/tests/Unit/RouteTest.php @@ -14,9 +14,10 @@ class RouteTest extends TestCase */ public function testLandingViewIsReturned() { - $response = $this->get('/'); + $response = $this->get(route('landing', ['any' => ''])); - $response->assertViewIs('landing'); + $response->assertSuccessful() + ->assertViewIs('landing'); } } \ No newline at end of file