fix test
This commit is contained in:
parent
d811f92dda
commit
5ac9b59116
@ -4,7 +4,6 @@ namespace Tests;
|
|||||||
|
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use App\Services\Hook;
|
use App\Services\Hook;
|
||||||
use Symfony\Component\DomCrawler\Crawler;
|
|
||||||
|
|
||||||
class HookTest extends TestCase
|
class HookTest extends TestCase
|
||||||
{
|
{
|
||||||
@ -90,12 +89,8 @@ class HookTest extends TestCase
|
|||||||
{
|
{
|
||||||
$user = factory(User::class)->create();
|
$user = factory(User::class)->create();
|
||||||
Hook::sendNotification([$user], 'Ibara Mayaka');
|
Hook::sendNotification([$user], 'Ibara Mayaka');
|
||||||
$html = $this->actingAs($user)
|
$user->refresh();
|
||||||
->get('/user')
|
$this->assertCount(1, $user->unreadNotifications);
|
||||||
->assertSee('Ibara Mayaka')
|
|
||||||
->getContent();
|
|
||||||
$crawler = new Crawler($html);
|
|
||||||
$this->assertEquals('1', trim($crawler->filter('.badge-warning')->text()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testPushMiddleware()
|
public function testPushMiddleware()
|
||||||
|
Loading…
Reference in New Issue
Block a user