Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
kostia-official committed May 5, 2017
1 parent 4e18b69 commit 0e11d3a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/rule-checker/rules/owner.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ function isOwner(ownerValue, userId) {
return Array.isArray(ownerValue) ?
_.includes(ownerValue, userId) :
String(ownerValue) === String(userId);
}
}
3 changes: 1 addition & 2 deletions test/unit/owner.test.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
const test = require('ava');
const _ = require('lodash');
const mongoose = require('mongoose');
const ownerRule = require('../../src/rule-checker/rules/owner');

mongoose.Promise = Promise;

const db = mongoose.createConnection('mongodb://localhost:27017/acl');
const schema = new mongoose.Schema({ userId: Number, usersIds: [Number] });
const Post = db.model('posts', schema);

const ownerRule = require('../../src/rule-checker/rules/owner');
const fn = ownerRule(db);

test('should be resolved for owner', async (t) => {
Expand Down

0 comments on commit 0e11d3a

Please sign in to comment.