-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathapp-delete-test.js
More file actions
38 lines (33 loc) · 1.03 KB
/
app-delete-test.js
File metadata and controls
38 lines (33 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import dotenv from 'dotenv'
import { describe, it, setup } from 'mocha'
import { jsonReader } from '../utility/fileOperations/readwrite'
import { contentstackClient } from '../utility/ContentstackClient.js'
import { expect } from 'chai'
dotenv.config()
let apps = {}
let installation = {}
const orgID = process.env.ORGANIZATION
let client = {}
describe('Apps api Test', () => {
setup(() => {
const user = jsonReader('loggedinuser.json')
client = contentstackClient(user.authtoken)
apps = jsonReader('apps.json')
installation = jsonReader('installation.json')
})
it('Uninstall installation test', done => {
client.organization(orgID).app(apps.uid).installation(installation.uid).uninstall()
.then((installation) => {
expect(installation).to.deep.equal({})
done()
}).catch(done)
})
it('Delete app test', done => {
client.organization(orgID).app(apps.uid).delete()
.then((appResponse) => {
expect(appResponse).to.deep.equal({})
done()
})
.catch(done)
})
})