diff options
author | Adam Young <ayoung@redhat.com> | 2011-01-26 13:46:49 -0500 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2011-01-27 16:49:11 -0500 |
commit | c3e065879056d85f0a769368c82b128a58c148e1 (patch) | |
tree | 628029b9ff1067408c6426d5def89a2086abf917 /install/ui/test | |
parent | f904df0f0dfd4734f978cdc3ddf5badabc067ed6 (diff) | |
download | freeipa-c3e065879056d85f0a769368c82b128a58c148e1.tar.gz freeipa-c3e065879056d85f0a769368c82b128a58c148e1.tar.xz freeipa-c3e065879056d85f0a769368c82b128a58c148e1.zip |
declarative for aci
A couple of the ACI definitions were incorrect, and the end result was that fields were not getting initialized. USing the declarative approach cleaned up the cause.
Also fixed a few broken unit tests
Diffstat (limited to 'install/ui/test')
-rw-r--r-- | install/ui/test/details_tests.js | 6 | ||||
-rw-r--r-- | install/ui/test/entity_tests.js | 11 | ||||
-rw-r--r-- | install/ui/test/navigation_tests.js | 10 |
3 files changed, 9 insertions, 18 deletions
diff --git a/install/ui/test/details_tests.js b/install/ui/test/details_tests.js index 38609072..fb33808c 100644 --- a/install/ui/test/details_tests.js +++ b/install/ui/test/details_tests.js @@ -22,11 +22,11 @@ module('details', { setup: function() { var obj_name = 'user'; - IPA.register_entity( + IPA.entity_factories.user= function(){ return IPA.entity({name:obj_name}); - }); - IPA.start_entities(); + }; + IPA.start_entities(); }, teardown: function() { } diff --git a/install/ui/test/entity_tests.js b/install/ui/test/entity_tests.js index a5878a6c..1178b99f 100644 --- a/install/ui/test/entity_tests.js +++ b/install/ui/test/entity_tests.js @@ -20,7 +20,8 @@ module('entity',{ setup: function() { - IPA.register_entity(function(){return IPA.entity({name:'user'})}); + IPA.entity_factories.user = function(){ + return IPA.entity({name:'user'})}; IPA.start_entities(); }, teardown: function() { @@ -87,14 +88,6 @@ test('Testing ipa_facet_setup_views().', function() { ); - IPA.register_entity(function(){ - var entity = IPA.entity({ - 'name': 'user' - }); - - return entity; - }); - IPA.start_entities(); var entity = IPA.get_entity('user'); diff --git a/install/ui/test/navigation_tests.js b/install/ui/test/navigation_tests.js index 916259b4..9db0bb1c 100644 --- a/install/ui/test/navigation_tests.js +++ b/install/ui/test/navigation_tests.js @@ -31,7 +31,7 @@ test("Testing nav_create().", function() { var entity; - IPA.register_entity( function() { + IPA.entity_factories.user = function() { var that = IPA.entity({name: 'user'}); that.setup = function(container){ user_mock_called = true; @@ -39,10 +39,8 @@ test("Testing nav_create().", function() { same(container[0].nodeName,'DIV','user div'); } return that; - }); - - IPA.register_entity( function(){ - + }; + IPA.entity_factories.group = function(){ var that = IPA.entity({name: 'group'}); that.setup = function(container){ group_mock_called = true; @@ -50,7 +48,7 @@ test("Testing nav_create().", function() { same(container[0].nodeName,'DIV','group Div'); }; return that; - }); + }; IPA.start_entities(); |