webstaff: add unit test for egOrg.root()
authorGalen Charlton <gmc@esilibrary.com>
Mon, 5 Oct 2015 20:24:43 +0000 (20:24 +0000)
committerKathy Lussier <klussier@masslnc.org>
Tue, 2 Feb 2016 19:58:48 +0000 (14:58 -0500)
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/web/js/ui/default/staff/test/unit/egOrg.js

index f919d66..253d48b 100644 (file)
@@ -32,6 +32,11 @@ describe('egOrg', function(){
         mkTree(egIDL, egEnv);
         expect(egOrg.fullPath(4, true)).toEqual([4, 2, 1]);
     }));
+
+    it('should provide root', inject(function(egIDL, egEnv, egOrg) {
+        mkTree(egIDL, egEnv);
+        expect(egOrg.root().id()).toEqual(1);
+    }));
 });