Test: admin nav should not show channels link after simplification
This commit is contained in:
32
tests/Feature/AdminNavShouldNotContainChannelsLinkTest.php
Normal file
32
tests/Feature/AdminNavShouldNotContainChannelsLinkTest.php
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Tests\Feature;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||||
|
use Tests\TestCase;
|
||||||
|
|
||||||
|
class AdminNavShouldNotContainChannelsLinkTest extends TestCase
|
||||||
|
{
|
||||||
|
use RefreshDatabase;
|
||||||
|
|
||||||
|
protected function loginAsPlatformAdmin(): void
|
||||||
|
{
|
||||||
|
$this->seed();
|
||||||
|
|
||||||
|
$this->post('/admin/login', [
|
||||||
|
'email' => 'platform.admin@demo.local',
|
||||||
|
'password' => 'Platform@123456',
|
||||||
|
])->assertRedirect('/admin');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function test_admin_layout_should_not_contain_channels_nav_link_after_simplification(): void
|
||||||
|
{
|
||||||
|
$this->loginAsPlatformAdmin();
|
||||||
|
|
||||||
|
$res = $this->get('/admin');
|
||||||
|
$res->assertOk();
|
||||||
|
|
||||||
|
$res->assertSee('href="/admin/settings/system"', false);
|
||||||
|
$res->assertDontSee('href="/admin/settings/channels"', false);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user