From a2e1425b878e66d178a84e59b45d29bad368dca2 Mon Sep 17 00:00:00 2001 From: Heiko Kernbach Date: Tue, 18 Feb 2014 16:00:00 +0100 Subject: [PATCH] karma fix for navigationviewspec --- .../test/specs/views/navigationViewSpec.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/js/apps/system/aardvark/test/specs/views/navigationViewSpec.js b/js/apps/system/aardvark/test/specs/views/navigationViewSpec.js index 61cb197a65..f5398451b0 100644 --- a/js/apps/system/aardvark/test/specs/views/navigationViewSpec.js +++ b/js/apps/system/aardvark/test/specs/views/navigationViewSpec.js @@ -7,11 +7,13 @@ describe("The navigation bar", function() { - var div, view, currentDBFake, curName, isSystem, DBSelectionViewDummy; + var div, view, currentDBFake, curName, isSystem, + DBSelectionViewDummy, StatisticBarViewDummy, UserBarViewDummy; beforeEach(function() { curName = "_system"; isSystem = true; + window.currentDB = window.currentDB || { get: function() {} }; @@ -21,6 +23,18 @@ render : function(){} }; + UserBarViewDummy = { + id : "UserBarViewDummy", + render : function(){} + }; + + StatisticBarViewDummy = { + id : "StatisticBarViewDummy", + render : function(){} + }; + + spyOn(window, "UserBarView").andReturn(UserBarViewDummy); + spyOn(window, "StatisticBarView").andReturn(StatisticBarViewDummy); spyOn(window, "DBSelectionView").andReturn(DBSelectionViewDummy); spyOn(window.currentDB, "get").andCallFake(function(key) { if (key === "name") {