Add more unit tests

This commit is contained in:
Frederic Guillot
2015-10-03 17:21:29 -04:00
parent d7c0fabcb7
commit 260c8515c5
7 changed files with 152 additions and 31 deletions

View File

@@ -50,19 +50,17 @@ class EmailNotificationTest extends Base
'file' => $file,
'changes' => array())
));
$this->assertNotEmpty($en->getMailSubject($event, array(
'task' => $task,
'comment' => $comment,
'subtask' => $subtask,
'file' => $file,
'changes' => array())
));
}
}
public function testGetEmailSubject()
{
$en = new EmailNotification($this->container);
$this->assertEquals(
'[test][Task opened] blah (#2)',
$en->getMailSubject(Task::EVENT_OPEN, array('task' => array('id' => 2, 'title' => 'blah', 'project_name' => 'test')))
);
}
public function testSendWithEmailAddress()
{
$en = new EmailNotification($this->container);