Cleanup unused tokendb apis

This commit is contained in:
Johannes Zellner
2020-02-07 23:06:45 +01:00
parent 7c86ed9783
commit 957e1a7708
2 changed files with 0 additions and 109 deletions

View File

@@ -820,17 +820,6 @@ describe('database', function () {
});
});
it('delByIdentifier succeeds', function (done) {
tokendb.add(TOKEN_1, function (error) {
expect(error).to.be(null);
tokendb.delByIdentifier(TOKEN_1.identifier, function (error) {
expect(error).to.be(null);
done();
});
});
});
it('cannot delete previously delete record', function (done) {
tokendb.del(TOKEN_0.id, function (error) {
expect(error).to.be.a(BoxError);
@@ -839,20 +828,6 @@ describe('database', function () {
});
});
it('getByIdentifierAndClientId succeeds', function (done) {
tokendb.add(TOKEN_0, function (error) {
expect(error).to.be(null);
tokendb.getByIdentifierAndClientId(TOKEN_0.identifier, TOKEN_0.clientId, function (error, result) {
expect(error).to.be(null);
expect(result).to.be.an(Array);
expect(result.length).to.equal(1);
expect(result[0]).to.eql(TOKEN_0);
done();
});
});
});
it('delExpired succeeds', function (done) {
tokendb.add(TOKEN_2, function (error) {
expect(error).to.be(null);
@@ -870,36 +845,6 @@ describe('database', function () {
});
});
});
it('delByIdentifierAndClientId succeeds', function (done) {
tokendb.delByIdentifierAndClientId(TOKEN_0.identifier, TOKEN_0.clientId, function (error) {
expect(error).to.be(null);
tokendb.getByAccessToken(TOKEN_0.accessToken, function (error, result) {
expect(error).to.be.a(BoxError);
expect(error.reason).to.be(BoxError.NOT_FOUND);
expect(result).to.not.be.ok();
done();
});
});
});
it('delByClientId succeeds', function (done) {
tokendb.add(TOKEN_0, function (error) {
expect(error).to.be(null);
tokendb.delByClientId(TOKEN_0.clientId, function (error) {
expect(error).to.not.be.ok();
tokendb.getByAccessToken(TOKEN_0.accessToken, function (error, result) {
expect(error).to.be.a(BoxError);
expect(error.reason).to.be(BoxError.NOT_FOUND);
expect(result).to.not.be.ok();
done();
});
});
});
});
});
describe('apps', function () {