Skip to content

Commit 729415c

Browse files
committed
Failing test case for permanent user deletion
1 parent b362fa8 commit 729415c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/user.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,13 @@ describe('users', () => {
107107
done();
108108
});
109109
});
110+
it('should permanently delete users by intercom user ID', done => {
111+
nock('https://api.intercom.io').post('/user_delete_requests', { intercom_user_id: 'foo' }).reply(200, { id: 10 });
112+
const client = new Client('foo', 'bar').usePromises();
113+
client.users.requestPermanentDeletion('foo').then(r => {
114+
assert.equal(200, r.statusCode);
115+
assert.deepStrictEqual({ id: 10 }, r.body);
116+
done();
117+
});
118+
});
110119
});

0 commit comments

Comments
 (0)