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().

Pushed under one-liner/trivial rule.

--
Endi S. Dewata
From 489f99000e23e3566ab4e1e6a2b6dca6402a3c46 Mon Sep 17 00:00:00 2001
From: Endi S. Dewata <edew...@redhat.com>
Date: Fri, 22 Jul 2011 13:48:31 -0500
Subject: [PATCH] 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 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/install/ui/test/navigation_tests.js b/install/ui/test/navigation_tests.js
index 94d0e027c0cd42b8a8b4aa8b974c74f4ce0d6b25..80d43536e9c43991bae33ca8681ccecf41792936 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) {
-- 
1.7.5.1

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to