Skip to content

Commit

Permalink
Clean up by removing unnecessary comments
Browse files Browse the repository at this point in the history
Signed-off-by: Supasate Choochaisri <[email protected]>
  • Loading branch information
supasate committed May 5, 2016
1 parent d4a869b commit dd78b36
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions test/role.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ var async = require('async');
var expect = require('chai').expect;

function checkResult(err, result) {
// console.log(err, result);
assert(!err);
}

Expand Down Expand Up @@ -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) {
Expand All @@ -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);
Expand Down Expand Up @@ -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 },
Expand All @@ -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);
Expand All @@ -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);
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit dd78b36

Please sign in to comment.