From ed0b568542f37cbf98b6413e684d1c65b74be667 Mon Sep 17 00:00:00 2001 From: Raymond Feng Date: Tue, 20 May 2014 16:17:52 -0700 Subject: [PATCH] Fix the test for mocha 1.19.0 See https://github.com/visionmedia/mocha/commit/6c705cd4d4bde87d735fcf6d8726af720bf392a5 --- test/acl.test.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/acl.test.js b/test/acl.test.js index ce75a12b..d928840d 100644 --- a/test/acl.test.js +++ b/test/acl.test.js @@ -14,10 +14,13 @@ function checkResult(err, result) { assert(!err); } -describe('security scopes', function () { +var ds = null; +before(function() { + ds = loopback.createDataSource({connector: loopback.Memory}); +}); +describe('security scopes', function () { beforeEach(function() { - var ds = this.ds = loopback.createDataSource({connector: loopback.Memory}); testModel = loopback.Model.extend('testModel'); ACL.attachTo(ds); Role.attachTo(ds); @@ -156,7 +159,6 @@ describe('security ACLs', function () { }); it("should honor defaultPermission from the model", function () { - var ds = this.ds; var Customer = ds.createModel('Customer', { name: { type: String, @@ -188,7 +190,6 @@ describe('security ACLs', function () { }); it("should honor static ACLs from the model", function () { - var ds = this.ds; var Customer = ds.createModel('Customer', { name: { type: String, @@ -226,7 +227,6 @@ describe('security ACLs', function () { it("should check access against LDL, ACL, and Role", function () { // var log = console.log; var log = function() {}; - var ds = this.ds; // Create User.create({name: 'Raymond', email: 'x@y.com', password: 'foobar'}, function (err, user) {