<?php

class NotificationTest extends TestCase {

  public function testAllowSendMessage()
  {
    $notification_type = $this->__faker->numberBetween(1, 8);
    $User = $this->setUser();

    $this->assertInstanceOf("App\\Notification", $User->sendNotification($notification_type));
  }

  public function testNotAllowSendMessage()
  {
    $User = $this->setUser();

    $notification_type = $this->__faker->numberBetween(1, 8);
    $User->notificationTypes()->detach($notification_type);

    $this->assertFalse($User->sendNotification($notification_type));
  }
}