Send tasks by email
This commit is contained in:
@@ -6,6 +6,23 @@ use Kanboard\Validator\TaskValidator;
|
||||
|
||||
class TaskValidatorTest extends Base
|
||||
{
|
||||
public function testValidationEmailCreation()
|
||||
{
|
||||
$taskValidator = new TaskValidator($this->container);
|
||||
|
||||
$result = $taskValidator->validateEmailCreation(array('email' => 'test@localhost', 'subject' => 'test'));
|
||||
$this->assertTrue($result[0]);
|
||||
|
||||
$result = $taskValidator->validateEmailCreation(array('email' => 'test', 'subject' => 'test'));
|
||||
$this->assertFalse($result[0]);
|
||||
|
||||
$result = $taskValidator->validateEmailCreation(array('subject' => 'test'));
|
||||
$this->assertFalse($result[0]);
|
||||
|
||||
$result = $taskValidator->validateEmailCreation(array('email' => 'test@localhost'));
|
||||
$this->assertFalse($result[0]);
|
||||
}
|
||||
|
||||
public function testRequiredFields()
|
||||
{
|
||||
$taskValidator = new TaskValidator($this->container);
|
||||
|
||||
Reference in New Issue
Block a user