Provide getByAppIdAndType() by clients.js

This commit is contained in:
Johannes Zellner
2016-06-03 14:47:06 +02:00
parent 201efa70b7
commit 725e1debcc
5 changed files with 20 additions and 4 deletions

View File

@@ -13,6 +13,7 @@ var appdb = require('../../appdb.js'),
async = require('async'),
child_process = require('child_process'),
clientdb = require('../../clientdb.js'),
clients = require('../../clients.js'),
config = require('../../config.js'),
constants = require('../../constants.js'),
database = require('../../database.js'),
@@ -709,7 +710,7 @@ describe('Apps', function () {
appContainer.inspect(function (error, data) {
expect(error).to.not.be.ok();
clientdb.getByAppIdAndType(APP_ID, clientdb.TYPE_OAUTH, function (error, client) {
clients.getByAppIdAndType(APP_ID, clientdb.TYPE_OAUTH, function (error, client) {
expect(error).to.not.be.ok();
expect(client.id.length).to.be(40); // cid- + 32 hex chars (128 bits) + 4 hyphens
expect(client.clientSecret.length).to.be(64); // 32 hex chars (256 bits)