From a8ea42bda841c8773d68886614faf9efd38e33bd Mon Sep 17 00:00:00 2001 From: Endi Sukma Dewata Date: Wed, 16 Nov 2011 21:07:20 -0600 Subject: Fixed entity metadata resolution. The current code assumes that an entity will always have a corresponding LDAPObject on the server, so it looks for the metadata in a fixed location. This assumption doesn't work for HBAC Test since it is a Command, not an LDAPObject, so the metadata has to be obtained from a different location. A new method get_default_metadata() has been added to allow each entity to find the metadata from the correct location. Ticket #388 --- install/ui/test/details_tests.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'install/ui/test/details_tests.js') diff --git a/install/ui/test/details_tests.js b/install/ui/test/details_tests.js index 0a914920..fee170ba 100644 --- a/install/ui/test/details_tests.js +++ b/install/ui/test/details_tests.js @@ -40,12 +40,13 @@ module('details', { details_container = $('
').appendTo(document.body); - var obj_name = 'user'; - IPA.entity_factories.user= - function(){ - return IPA.entity({name:obj_name, - metadata:IPA.metadata.objects.user}); - }; + IPA.register('user', function(spec) { + + return IPA.entity({ + name: 'user', + metadata: IPA.metadata.objects.user + }); + }); }, teardown: function() { details_container.remove(); @@ -175,10 +176,10 @@ test("Testing details lifecycle: create, load.", function(){ var that = IPA.entity(spec); - that.init = function(params) { - that.entity_init(params); + that.init = function() { + that.entity_init(); - params.builder.details_facet({ + that.builder.details_facet({ sections: [ { name: 'identity', -- cgit