Fix the test for mocha 1.19.0

See 6c705cd4d4
This commit is contained in:
Raymond Feng 2014-05-20 16:17:52 -07:00
parent 0b315964d3
commit ed0b568542
1 changed files with 5 additions and 5 deletions

View File

@ -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) {