/** @test */
function it_delete_all_notification_expired_by_category_name()
{
$category = $this->createCategory(['name' => 'test']);
$this->createNotification(['category_id' => $category->id, 'expire_time' => Carbon\Carbon::now()->subDays(1)]);
$this->createNotification(['category_id' => $category->id, 'expire_time' => Carbon\Carbon::now()->subDays(1)]);
$this->createNotification(['category_id' => $category->id, 'expire_time' => Carbon\Carbon::now()->subDays(1)]);
$this->createNotification(['category_id' => $category->id, 'expire_time' => Carbon\Carbon::now()->addDays(1)]);
$this->notificationRepo->deleteByCategory($category->name, true);
$this->assertCount(1, Notification::all());
}