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