forked from strongloop/loopback
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up by removing unnecessary comments
Signed-off-by: Supasate Choochaisri <[email protected]>
- Loading branch information
Showing
1 changed file
with
0 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,6 @@ var async = require('async'); | |
var expect = require('chai').expect; | ||
|
||
function checkResult(err, result) { | ||
// console.log(err, result); | ||
assert(!err); | ||
} | ||
|
||
|
@@ -61,7 +60,6 @@ describe('role model', function() { | |
|
||
it('should define role/user relations', function() { | ||
User.create({ name: 'Raymond', email: '[email protected]', password: 'foobar' }, function(err, user) { | ||
// console.log('User: ', user.id); | ||
Role.create({ name: 'userRole' }, function(err, role) { | ||
role.principals.create({ principalType: RoleMapping.USER, principalId: user.id }, | ||
function(err, p) { | ||
|
@@ -72,7 +70,6 @@ describe('role model', function() { | |
}); | ||
role.principals(function(err, principals) { | ||
assert(!err); | ||
// console.log(principals); | ||
assert.equal(principals.length, 1); | ||
assert.equal(principals[0].principalType, RoleMapping.USER); | ||
assert.equal(principals[0].principalId, user.id); | ||
|
@@ -105,7 +102,6 @@ describe('role model', function() { | |
|
||
it('should automatically generate role id', function() { | ||
User.create({ name: 'Raymond', email: '[email protected]', password: 'foobar' }, function(err, user) { | ||
// console.log('User: ', user.id); | ||
Role.create({ name: 'userRole' }, function(err, role) { | ||
assert(role.id); | ||
role.principals.create({ principalType: RoleMapping.USER, principalId: user.id }, | ||
|
@@ -119,7 +115,6 @@ describe('role model', function() { | |
}); | ||
role.principals(function(err, principals) { | ||
assert(!err); | ||
// console.log(principals); | ||
assert.equal(principals.length, 1); | ||
assert.equal(principals[0].principalType, RoleMapping.USER); | ||
assert.equal(principals[0].principalId, user.id); | ||
|
@@ -136,12 +131,9 @@ describe('role model', function() { | |
|
||
it('should support getRoles() and isInRole()', function() { | ||
User.create({ name: 'Raymond', email: '[email protected]', password: 'foobar' }, function(err, user) { | ||
// console.log('User: ', user.id); | ||
Role.create({ name: 'userRole' }, function(err, role) { | ||
role.principals.create({ principalType: RoleMapping.USER, principalId: user.id }, | ||
function(err, p) { | ||
// Role.find(console.log); | ||
// role.principals(console.log); | ||
Role.isInRole('userRole', { principalType: RoleMapping.USER, principalId: user.id }, | ||
function(err, exists) { | ||
assert(!err && exists === true); | ||
|
@@ -230,7 +222,6 @@ describe('role model', function() { | |
assert(!err && yes); | ||
}); | ||
|
||
// console.log('User: ', user.id); | ||
Album.create({ name: 'Album 1', userId: user.id }, function(err, album1) { | ||
var role = { principalType: ACL.USER, principalId: user.id, model: Album, id: album1.id }; | ||
Role.isInRole(Role.OWNER, role, function(err, yes) { | ||
|