summaryrefslogtreecommitdiffstats
path: root/install/ui/test/aci_tests.js
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2011-11-07 14:21:45 -0600
committerPetr Vobornik <pvoborni@redhat.com>2011-12-21 14:59:49 +0100
commit5fc064f13e44812042a617a322bcd6111d2b39b2 (patch)
treef89503069c5d4eabbb940aff34b9733607ce93d2 /install/ui/test/aci_tests.js
parent49e5555b11d0bee814bce807acacbfeb381379f1 (diff)
downloadfreeipa.git-5fc064f13e44812042a617a322bcd6111d2b39b2.tar.gz
freeipa.git-5fc064f13e44812042a617a322bcd6111d2b39b2.tar.xz
freeipa.git-5fc064f13e44812042a617a322bcd6111d2b39b2.zip
Refactored entity object resolution.
The IPA.get_entity() has been modified to accept either entity name or entity object. If it receives an entity object it will return the object itself. Otherwise, it will resolve the name in the entity registry. The other_entity variables have been modified to store a reference to the entity object instead of its name. The test cases have been modified to use real entity objects instead of just the names. Ticket #2042
Diffstat (limited to 'install/ui/test/aci_tests.js')
-rw-r--r--install/ui/test/aci_tests.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/install/ui/test/aci_tests.js b/install/ui/test/aci_tests.js
index 8f8e8b57..e166aa3d 100644
--- a/install/ui/test/aci_tests.js
+++ b/install/ui/test/aci_tests.js
@@ -22,7 +22,8 @@
var target_container;
var target_widget;
var target_facet;
-var entity = IPA.entity({ name:'bogus', metadata: {} });
+var entity = IPA.entity({ name: 'bogus' });
+var group_entity = IPA.entity({ name: 'group' });
module('aci', {
setup: function() {
@@ -74,6 +75,7 @@ module('aci', {
{
type: 'permission_target',
container_factory: IPA.details_table_section,
+ group_entity: group_entity,
name: 'target',
label: 'Target',
show_target: false