aboutsummaryrefslogtreecommitdiffstats
path: root/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexAjax.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexAjax.test.js')
-rw-r--r--gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexAjax.test.js29
1 files changed, 11 insertions, 18 deletions
diff --git a/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexAjax.test.js b/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexAjax.test.js
index dadbaa0..362a1f9 100644
--- a/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexAjax.test.js
+++ b/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexAjax.test.js
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2020-2021 Nordix Foundation
+ * Copyright (C) 2020-2022 Nordix Foundation
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,12 +29,9 @@ beforeEach(() => {
port: 'port',
username: 'username',
password: 'password',
- messages: {
- message: ''
- },
+ messages: [''],
content: ['01', '02'],
- result: 'ok',
- ok: true
+ result: 'SUCCESS'
};
});
@@ -72,12 +69,10 @@ test('Test ajax_getWithKeyInfo success', (done) => {
});
done();
});
- data.messages = {
- message: [
- '{"apexKeyInfo": {"UUID": "UUID1", "description": "description1", "key":{"name": "name1", "version":' +
- ' "version1"}}, "objectType": {"key": {"name": "name1", "version": "version1"}}}'
- ]
- };
+ data.messages = [
+ '{"apexKeyInfo": {"UUID": "UUID1", "description": "description1", "key":{"name": "name1", "version":' +
+ ' "version1"}}, "objectType": {"key": {"name": "name1", "version": "version1"}}}'
+ ];
const jqXHR = {status: 200, responseText: ""};
$.ajax = jest.fn().mockImplementation((args) => {
@@ -98,12 +93,10 @@ test('Test ajax_getWithKeyInfo with custom key success', (done) => {
});
done();
});
- data.messages = {
- message: [
- '{"apexKeyInfo": {"UUID": "UUID1", "description": "description1", "key":{"name": "name1",' +
- ' "version": "version1"}}, "objectType": {"customKey": {"name": "name1", "version": "version1"}}}'
- ]
- };
+ data.messages = [
+ '{"apexKeyInfo": {"UUID": "UUID1", "description": "description1", "key":{"name": "name1",' +
+ ' "version": "version1"}}, "objectType": {"customKey": {"name": "name1", "version": "version1"}}}'
+ ];
const jqXHR = {status: 200, responseText: ""};
$.ajax = jest.fn().mockImplementation((args) => {