Add user invitations
This commit is contained in:
27
tests/units/Model/InviteModelTest.php
Normal file
27
tests/units/Model/InviteModelTest.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
use Kanboard\Model\InviteModel;
|
||||
|
||||
require_once __DIR__.'/../Base.php';
|
||||
|
||||
class InviteModelTest extends Base
|
||||
{
|
||||
public function testCreation()
|
||||
{
|
||||
$inviteModel = new InviteModel($this->container);
|
||||
|
||||
$this->container['emailClient']
|
||||
->expects($this->exactly(2))
|
||||
->method('send');
|
||||
|
||||
$inviteModel->createInvites(array('user@domain1.tld', '', 'user@domain2.tld'), 1);
|
||||
}
|
||||
|
||||
public function testRemove()
|
||||
{
|
||||
$inviteModel = new InviteModel($this->container);
|
||||
$inviteModel->createInvites(array('user@domain1.tld', 'user@domain2.tld'), 0);
|
||||
$this->assertTrue($inviteModel->remove('user@domain1.tld'));
|
||||
$this->assertFalse($inviteModel->remove('foobar'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user