added siemap and customer test

pull/49/head
A1Gard 4 months ago
parent b7665af600
commit 2ea6356c53

@ -357,7 +357,7 @@ Route::prefix(config('app.panel.prefix'))->name('admin.')->group(
});
Route::get('theme/variable.css', [\App\Http\Controllers\ThemeController::class, 'cssVariables'])->name('theme.variable.css');
Route::get('/theme/variable', [\App\Http\Controllers\ThemeController::class, 'cssVariables'])->name('theme.variable.css');
Route::middleware([\App\Http\Middleware\VisitorCounter::class])
->name('client.')->group(function () {

@ -0,0 +1,29 @@
<?php
namespace Tests\Feature;
use App\Models\Customer;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker;
use Tests\TestCase;
class CustomerTest extends TestCase
{
public function check(){
if (Customer::count() == 0){
Customer::factory(1)->create();
}
}
/**
* A basic feature test example.
*/
public function test_customer_profile(): void
{
$this->check();
$response = $this->actingAs(Customer::inRandomOrder()->first(),'customer')->get(route('client.profile'));
$response->assertStatus(200);
}
}

@ -0,0 +1,20 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker;
use Tests\TestCase;
class SiteMapTest extends TestCase
{
/**
* A basic feature test example.
*/
public function test_sitemap(): void
{
$response = $this->get(route('sitemap'));
$response->assertStatus(200);
}
}
Loading…
Cancel
Save