Commit 4249416f authored by Viral Solani's avatar Viral Solani

Merge branch 'develop' of https://github.com/viralsolani/laravel-adminpanel into develop

parents c19d6d0b a245750a
......@@ -2,10 +2,10 @@
namespace Tests\Feature;
use App\Events\Frontend\Auth\UserLoggedIn;
use Illuminate\Support\Facades\Auth;
use Tests\BrowserKitTestCase;
use Illuminate\Support\Facades\Event;
use App\Events\Frontend\Auth\UserLoggedIn;
use Tests\BrowserKitTestCase;
class AuthTest extends BrowserKitTestCase
{
......@@ -44,22 +44,22 @@ class AuthTest extends BrowserKitTestCase
public function users_can_login()
{
// Make sure our events are fired
Event::fake();
Event::fake();
Auth::logout();
Auth::logout();
//User Test
$this->visit('/login')
//User Test
$this->visit('/login')
->type($this->user->email, 'email')
->type('1234', 'password')
->press('Login')
->see($this->user->name)
->seePageIs('/dashboard');
Auth::logout();
Auth::logout();
//Admin Test
$this->visit('/login')
//Admin Test
$this->visit('/login')
->type($this->admin->email, 'email')
->type('1234', 'password')
->press('Login')
......@@ -67,6 +67,6 @@ class AuthTest extends BrowserKitTestCase
->see($this->admin->first_name)
->see('Access Management');
Event::assertDispatched(UserLoggedIn::class);
Event::assertDispatched(UserLoggedIn::class);
}
}
\ No newline at end of file
}
......@@ -53,7 +53,6 @@ abstract class TestCase extends BaseTestCase
/**
* Set up tests.
*/
public function setUp()
{
parent::setUp();
......
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