diff options
author | Endi S. Dewata <edewata@redhat.com> | 2011-03-08 14:36:59 -0600 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2011-03-08 17:05:01 -0500 |
commit | ed5cffd026a6528ea47802d16417139dd2734980 (patch) | |
tree | d8ee085ba5cab222b882e5dddd91f97aed2ae578 /install/ui/test/navigation_tests.js | |
parent | 1c741e62780e966cc0d1efc6541bd19e2c9e4e86 (diff) | |
download | freeipa-ed5cffd026a6528ea47802d16417139dd2734980.tar.gz freeipa-ed5cffd026a6528ea47802d16417139dd2734980.tar.xz freeipa-ed5cffd026a6528ea47802d16417139dd2734980.zip |
Fixed self service page.
Collaborated with ayoung to fix this problem:
https://fedorahosted.org/freeipa/ticket/1070
Diffstat (limited to 'install/ui/test/navigation_tests.js')
-rw-r--r-- | install/ui/test/navigation_tests.js | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/install/ui/test/navigation_tests.js b/install/ui/test/navigation_tests.js index 29b1cfab9..7eb14ce40 100644 --- a/install/ui/test/navigation_tests.js +++ b/install/ui/test/navigation_tests.js @@ -19,7 +19,20 @@ */ -module('navigation'); +module('navigation', { + setup: function() { + IPA.ajax_options.async = false; + IPA.init( + 'data', + true, + function(data, text_status, xhr) { + }, + function(xhr, text_status, error_thrown) { + ok(false, 'ipa_init() failed: '+error_thrown); + } + ); + } +}); test("Testing IPA.nav.create().", function() { @@ -37,7 +50,7 @@ test("Testing IPA.nav.create().", function() { user_mock_called = true; same(container[0].id,'user','user id'); same(container[0].nodeName,'DIV','user div'); - } + }; return that; }; IPA.entity_factories.group = function(){ @@ -57,6 +70,7 @@ test("Testing IPA.nav.create().", function() { var user_mock_called = false; var group_mock_called = false; IPA.nav.create(mock_tabs_lists, navigation, 'tabs'); + IPA.nav.update_tabs(); ok(user_mock_called, "mock user setup was called"); ok(!group_mock_called, "mock group setup was not called because the tab is inactive"); same( navigation[0].children.length, 2, "Two Child tabs"); |