diff options
author | Endi Sukma Dewata <edewata@redhat.com> | 2011-11-17 12:09:00 -0600 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2011-11-18 15:57:00 +0000 |
commit | e84bd27af2db254fb1ed5ccc58202f0fb5c6f8cc (patch) | |
tree | 7f158d66b17e1639e685dc7673a995d31b3dfd32 /install/ui/test/entity_tests.js | |
parent | a9e4316d5aa626e0831febd8b50678fd81f6a67d (diff) | |
download | freeipa.git-e84bd27af2db254fb1ed5ccc58202f0fb5c6f8cc.tar.gz freeipa.git-e84bd27af2db254fb1ed5ccc58202f0fb5c6f8cc.tar.xz freeipa.git-e84bd27af2db254fb1ed5ccc58202f0fb5c6f8cc.zip |
Fixed entity definition in test cases.
The test cases have been updated to use the new extensible mechanism
for defining and registering entities.
Ticket #2043
Diffstat (limited to 'install/ui/test/entity_tests.js')
-rw-r--r-- | install/ui/test/entity_tests.js | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/install/ui/test/entity_tests.js b/install/ui/test/entity_tests.js index 84a5e28f..f6554938 100644 --- a/install/ui/test/entity_tests.js +++ b/install/ui/test/entity_tests.js @@ -31,14 +31,20 @@ module('entity',{ url: 'data', on_success: function(data, text_status, xhr) { - IPA.entity_factories.user = function(){ - return IPA. - entity_builder(). - entity('user'). - search_facet({ - columns:['uid']}). - build(); - }; + IPA.register('user', function(spec) { + + var that = IPA.entity(spec); + + that.init = function(params) { + that.entity_init(params); + + params.builder.search_facet({ + columns: [ 'uid' ] + }); + }; + + return that; + }); }, on_error: function(xhr, text_status, error_thrown) { ok(false, "ipa_init() failed: "+error_thrown); @@ -60,12 +66,7 @@ test('Testing IPA.entity_set_search_definition().', function() { return true; }; - var entity = IPA. - entity_builder(). - entity('user'). - search_facet({ - columns:['uid']}). - build(); + var entity = IPA.get_entity('user'); var entity_container = $('<div/>', { name: 'user', |