Commit e6eb5130 authored by Viral Solani's avatar Viral Solani

Add Log Viewer Tests

parent ec1d8544
......@@ -111,6 +111,9 @@
</li>
@endauth
</ul>
</li>
@endauth
@permission('view-faq')
<li class="{{ active_class(Active::checkUriPattern('admin/faqs*')) }}">
<a href="{{ route('admin.faqs.index')}}">
......@@ -119,8 +122,6 @@
</a>
</li>
@endauth
</li>
@endauth
<li class="{{ active_class(Active::checkUriPattern('admin/log-viewer*')) }} treeview">
<a href="#">
......
<?php
namespace Tests\Feature\Backend;
use Tests\BrowserKitTestCase;
/**
* Class LogViewerRouteTest.
*/
class LogViewerRouteTest extends BrowserKitTestCase
{
/** @test **/
public function admin_users_can_see_logviewer_dashboard()
{
$this->actingAs($this->admin)
->visit('/admin/log-viewer')
->see('Log Viewer');
}
/** @test **/
public function admin_users_can_see_logviewer_list()
{
$this->actingAs($this->admin)
->visit('/admin/log-viewer/logs')
->see('Logs');
}
/** @test **/
public function admin_users_can_see_logviewer_single_date()
{
$this->actingAs($this->admin)
->visit('/admin/log-viewer/logs/'.date('Y-m-d'))
->see('Log ['.date('Y-m-d').']');
}
/** @test **/
public function admin_users_can_see_logviewer_single_date_type()
{
$this->actingAs($this->admin)
->visit('/admin/log-viewer/logs/'.date('Y-m-d').'/error')
->see('Log ['.date('Y-m-d').']');
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment