From 28b9288c51e47afe7f7e9821f74db4b62deee551 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Fri, 22 Jul 2011 13:48:31 -0500 Subject: Fixed navigation unit test. The mock-up get_state() has been modified to return an empty object if it's called without parameter. It's the same as $bbq.getState(). --- install/ui/test/navigation_tests.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'install') diff --git a/install/ui/test/navigation_tests.js b/install/ui/test/navigation_tests.js index 94d0e027c..80d43536e 100644 --- a/install/ui/test/navigation_tests.js +++ b/install/ui/test/navigation_tests.js @@ -131,7 +131,7 @@ test("Testing IPA.navigation.update() with valid index.", function() { }; navigation.get_state = function(key) { - return state[key]; + return key ? state[key] : {}; }; navigation.remove_state = function(key) { @@ -183,7 +183,7 @@ test("Testing IPA.navigation.update() with out-of-range index.", function() { }; navigation.get_state = function(key) { - return state[key]; + return key ? state[key] : {}; }; navigation.remove_state = function(key) { -- cgit