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