-
-
Save uno-de-piera/edb756e421ef63dc941ca900ce7f71f7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function testDatatablesRemoveUser() | |
{ | |
factory(User::class, 10)->create(); | |
$userToLogin = User::find(2); | |
$userToRemove = User::find(1); | |
$this->browse(function (Browser $browser) use($userToLogin, $userToRemove) | |
{ | |
$browser->loginAs($userToLogin) | |
->visit('/users/datatables') | |
->pause(500) //peticiones ajax | |
->with('.table', function (Browser $table) use ($userToLogin, $userToRemove) | |
{ | |
$table | |
->assertSee($userToLogin->email) | |
->clickLink('Destroy') | |
->pause(500) | |
->assertDontSee($userToRemove->email); | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment