summaryrefslogtreecommitdiffstats
path: root/install/static/test
diff options
context:
space:
mode:
Diffstat (limited to 'install/static/test')
-rw-r--r--install/static/test/data/batch.json33
-rw-r--r--install/static/test/data/sudorule_find.json17
-rw-r--r--install/static/test/data/sudorule_show.json72
-rw-r--r--install/static/test/details_tests.js10
4 files changed, 126 insertions, 6 deletions
diff --git a/install/static/test/data/batch.json b/install/static/test/data/batch.json
index a8a5da0b1..a38cd9767 100644
--- a/install/static/test/data/batch.json
+++ b/install/static/test/data/batch.json
@@ -4099,7 +4099,38 @@
}
},
{
- "error": "i18n_messages"
+ "error": null,
+ "messages": {
+ "ajax": {
+ "401": "Your kerberos ticket no longer valid.Please run KInit and then click 'retry'If this is your first time running the IPA Web UI<a href='/ipa/errors/ssbrowser.html'> Follow these directions</a> to configure your browser."
+ },
+ "button": {
+ "add": "Add",
+ "enroll": "Enroll",
+ "find": "Find",
+ "remove": "Delete",
+ "reset": "Reset",
+ "update": "Update"
+ },
+ "details": {
+ "account": "Account Details",
+ "contact": "Contact Details",
+ "employee": " Employee Information",
+ "identity": "Identity Details",
+ "mailing": "Mailing Address",
+ "misc": "Misc. Information",
+ "to_top": "Back to Top"
+ },
+ "login": {
+ "header": "Logged In As"
+ },
+ "search": {
+ "delete_confirm": "Do you really want to delete the selected entries?",
+ "quick_links": "Quick Links",
+ "select_all": "Select All",
+ "unselect_all": "Unselect All"
+ }
+ }
},
{
"count": 1,
diff --git a/install/static/test/data/sudorule_find.json b/install/static/test/data/sudorule_find.json
new file mode 100644
index 000000000..ff8474af7
--- /dev/null
+++ b/install/static/test/data/sudorule_find.json
@@ -0,0 +1,17 @@
+{
+ "error": null,
+ "id": 0,
+ "result": {
+ "count": 1,
+ "result": [
+ {
+ "cn": [
+ "test"
+ ],
+ "dn": "ipauniqueid=4fc57a02-f23311df-b268e50e-a3b3ef71,cn=sudorules,dc=dev,dc=example,dc=com"
+ }
+ ],
+ "summary": null,
+ "truncated": false
+ }
+}
diff --git a/install/static/test/data/sudorule_show.json b/install/static/test/data/sudorule_show.json
new file mode 100644
index 000000000..332caa2f0
--- /dev/null
+++ b/install/static/test/data/sudorule_show.json
@@ -0,0 +1,72 @@
+{
+ "error": null,
+ "id": 0,
+ "result": {
+ "result": {
+ "attributelevelrights": {
+ "aci": "rscwo",
+ "cmdcategory": "rscwo",
+ "cn": "rscwo",
+ "description": "rscwo",
+ "externalhost": "rscwo",
+ "externaluser": "rscwo",
+ "hostcategory": "rscwo",
+ "hostmask": "rscwo",
+ "ipaenabledflag": "rscwo",
+ "ipasudoopt": "rscwo",
+ "ipasudorunas": "rscwo",
+ "ipasudorunasextgroup": "rscwo",
+ "ipasudorunasextuser": "rscwo",
+ "ipasudorunasgroup": "rscwo",
+ "ipasudorunasgroupcategory": "rscwo",
+ "ipasudorunasusercategory": "rscwo",
+ "ipauniqueid": "rsc",
+ "memberallowcmd": "rscwo",
+ "memberdenycmd": "rscwo",
+ "memberhost": "rscwo",
+ "memberuser": "rscwo",
+ "nsaccountlock": "rscwo",
+ "usercategory": "rscwo"
+ },
+ "cn": [
+ "test"
+ ],
+ "dn": "ipauniqueid=4fc57a02-f23311df-b268e50e-a3b3ef71,cn=sudorules,dc=dev,dc=example,dc=com",
+ "ipauniqueid": [
+ "4fc57a02-f23311df-b268e50e-a3b3ef71"
+ ],
+ "memberallowcmd_sudocmd": [
+ "/usr/bin/less"
+ ],
+ "memberallowcmd_sudocmdgroup": [
+ "group1"
+ ],
+ "memberdenycmd_sudocmd": [
+ "/usr/bin/more"
+ ],
+ "memberdenycmd_sudocmdgroup": [
+ "group1",
+ "group2"
+ ],
+ "memberhost_host": [
+ "dev.example.com"
+ ],
+ "memberhost_hostgroup": [
+ "production",
+ "staging"
+ ],
+ "memberuser_group": [
+ "editors"
+ ],
+ "memberuser_user": [
+ "test"
+ ],
+ "objectclass": [
+ "ipaassociation",
+ "ipasudorule"
+ ]
+ },
+ "summary": null,
+ "value": "test"
+ }
+}
diff --git a/install/static/test/details_tests.js b/install/static/test/details_tests.js
index 04738143c..baa884e28 100644
--- a/install/static/test/details_tests.js
+++ b/install/static/test/details_tests.js
@@ -179,7 +179,7 @@ test("Testing details lifecycle: create, setup, load.", function(){
var facet = entity.get_facet('details');
facet.create(container);
facet.setup(container);
- facet.display(result);
+ facet.load(result);
var contact = container.find('dl#contact.entryattrs');
@@ -211,10 +211,10 @@ test("Testing details lifecycle: create, setup, load.", function(){
ok (load_manager_called, 'load manager called');
- facet.update(container,
- 'kfrog',
- function(){update_success_called = true},
- function(){update_failure_called = true});
+ facet.update(
+ function(){update_success_called = true},
+ function(){update_failure_called = true}
+ );
ok (update_success_called,'update success called');
ok (!update_failure_called,'update failure not called');