Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zimbra-admin-api-js
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Public
zimbra-admin-api-js
Commits
fa5f6ee6
Commit
fa5f6ee6
authored
Sep 16, 2016
by
David Gatica
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
function deleteCos, added
parent
439563aa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
index.js
src/index.js
+7
-0
test.js
test/test.js
+15
-0
No files found.
src/index.js
View file @
fa5f6ee6
...
...
@@ -592,6 +592,13 @@ class ZimbraAdminApi {
return
this
.
remove
(
'Domain'
,
resource_data
,
callback
);
}
deleteCos
(
id_cos
,
callback
){
const
request_data
=
this
.
buildRequestData
(
'DeleteCos'
,
callback
);
request_data
.
parse_response
=
ResponseParser
.
emptyResponse
;
request_data
.
params
.
params
=
{
'id'
:
{
'_content'
:
id_cos
}};
return
this
.
performRequest
(
request_data
);
}
removeDomainAdmin
(
domain
,
account_id
,
coses
,
callback
)
{
this
.
getDomain
(
domain
,
(
err
,
domain
)
=>
{
if
(
err
)
return
callback
(
err
);
...
...
test/test.js
View file @
fa5f6ee6
...
...
@@ -841,6 +841,21 @@ var zimbraAdminPassword = process.env.ZIMBRA_PASSWORD || '12345678';
});
})
it
.
only
(
'Should delete COS "unknow" '
,
function
(
done
){
let
api
=
new
ZimbraAdminApi
(
auth_data
);
api
.
getCos
(
"unknow"
,
function
(
err
,
cos
){
if
(
err
)
return
console
.
error
(
err
);
let
cosId
=
cos
.
id
;
console
.
log
(
cosId
);
api
.
deleteCos
(
cosId
,
function
(
err
,
res
){
if
(
err
)
return
console
.
error
(
err
);
console
.
log
(
res
);
expect
(
err
).
to
.
be
.
null
;
done
();
})
});
})
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment