From a6a00a00400f164c4b18094999a5ed72366dd519 Mon Sep 17 00:00:00 2001
From: Frederic Guillot <fred@kanboard.net>
Date: Sun, 13 Sep 2015 14:07:56 -0400
Subject: First draft for plugins system

---
 tests/units/Model/AclTest.php     | 12 ++++++++++++
 tests/units/Model/ProjectTest.php |  2 +-
 2 files changed, 13 insertions(+), 1 deletion(-)

(limited to 'tests/units/Model')

diff --git a/tests/units/Model/AclTest.php b/tests/units/Model/AclTest.php
index fef03990..3cb28a77 100644
--- a/tests/units/Model/AclTest.php
+++ b/tests/units/Model/AclTest.php
@@ -290,4 +290,16 @@ class AclTest extends Base
         $this->assertFalse($acl->isAllowed('task', 'remove', 1));
         $this->assertTrue($acl->isAllowed('app', 'index', 1));
     }
+
+    public function testExtend()
+    {
+        $acl = new Acl($this->container);
+
+        $this->assertFalse($acl->isProjectManagerAction('plop', 'show'));
+
+        $acl->extend('project_manager_acl', array('plop' => '*'));
+
+        $this->assertTrue($acl->isProjectManagerAction('plop', 'show'));
+        $this->assertTrue($acl->isProjectManagerAction('swimlane', 'index'));
+    }
 }
diff --git a/tests/units/Model/ProjectTest.php b/tests/units/Model/ProjectTest.php
index 97357796..9d7b6c0d 100644
--- a/tests/units/Model/ProjectTest.php
+++ b/tests/units/Model/ProjectTest.php
@@ -26,7 +26,7 @@ class ProjectTest extends Base
             $this->assertNotFalse($p->create(array('name' => 'UnitTest '.$locale)), 'Unable to create project with '.$locale.':'.$language);
         }
 
-        Translator::load('en_US');
+        Translator::unload();
     }
 
     public function testCreation()
-- 
cgit v1.2.3