Add unit tests for last automatic actions

This commit is contained in:
Frederic Guillot
2016-01-31 19:51:59 -05:00
parent 505f62e6ca
commit 0bc51620c7
9 changed files with 247 additions and 93 deletions

View File

@@ -193,11 +193,12 @@ class Category extends Base
*/
public function duplicate($src_project_id, $dst_project_id)
{
$categories = $this->db->table(self::TABLE)
->columns('name')
->eq('project_id', $src_project_id)
->asc('name')
->findAll();
$categories = $this->db
->table(self::TABLE)
->columns('name')
->eq('project_id', $src_project_id)
->asc('name')
->findAll();
foreach ($categories as $category) {
$category['project_id'] = $dst_project_id;