- index method refactoret

- Added AppTest
This commit is contained in:
Peter Papp
2021-03-11 09:41:31 +01:00
parent 6075a1b7c8
commit af5181d4d7
5 changed files with 51 additions and 36 deletions

View File

@@ -0,0 +1,33 @@
<?php
namespace Tests\Feature\App;
use App\Services\SetupService;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker;
use Tests\TestCase;
class AppTest extends TestCase
{
use DatabaseMigrations;
public function __construct()
{
parent::__construct();
$this->setup = app()->make(SetupService::class);
}
/**
* @test
*/
public function it_get_index_page()
{
$this->setup->seed_default_pages();
$this->setup->seed_default_settings('Extended');
$this->get('/')
->assertStatus(200);
}
}