diff --git a/src/appdb.js b/src/appdb.js index 1e44a8fe2..913ed2980 100644 --- a/src/appdb.js +++ b/src/appdb.js @@ -272,17 +272,6 @@ function add(id, appStoreId, manifest, location, domain, portBindings, data, cal }); } -function exists(id, callback) { - assert.strictEqual(typeof id, 'string'); - assert.strictEqual(typeof callback, 'function'); - - database.query('SELECT 1 FROM apps WHERE id=?', [ id ], function (error, result) { - if (error) return callback(new BoxError(BoxError.DATABASE_ERROR, error)); - - return callback(null, result.length !== 0); - }); -} - function getPortBindings(id, callback) { assert.strictEqual(typeof id, 'string'); assert.strictEqual(typeof callback, 'function'); diff --git a/src/test/database-test.js b/src/test/database-test.js index 10105c015..34357671c 100644 --- a/src/test/database-test.js +++ b/src/test/database-test.js @@ -147,14 +147,6 @@ describe('database', function () { expect(function () { appdb.add(APP_0.id, function () {}); }).to.throwError(); }); - it('exists returns false', function (done) { - appdb.exists(APP_0.id, function (error, exists) { - expect(error).to.be(null); - expect(exists).to.be(false); - done(); - }); - }); - it('add succeeds', function (done) { appdb.add(APP_0.id, APP_0.appStoreId, APP_0.manifest, APP_0.location, APP_0.domain, APP_0.portBindings, APP_0, function (error) { expect(error).to.be(null); @@ -162,14 +154,6 @@ describe('database', function () { }); }); - it('exists succeeds', function (done) { - appdb.exists(APP_0.id, function (error, exists) { - expect(error).to.be(null); - expect(exists).to.be(true); - done(); - }); - }); - it('getPortBindings succeeds', function (done) { appdb.getPortBindings(APP_0.id, function (error, bindings) { expect(error).to.be(null);