We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc28cc3 commit 0984e4aCopy full SHA for 0984e4a
lib/role.js
@@ -30,6 +30,8 @@ module.exports = function(AV) {
30
if (_.isString(name)) {
31
AV.Object.prototype.constructor.call(this, null, null);
32
this.setName(name);
33
+ } else {
34
+ AV.Object.prototype.constructor.call(this, name, acl);
35
}
36
if (acl === undefined) {
37
var defaultAcl = new AV.ACL();
test/role.js
@@ -20,5 +20,10 @@ describe("Role", function() {
20
new AV.Role('foo', {});
21
}).to.throwError();
22
});
23
+ it('no argument', function() {
24
+ expect(function() {
25
+ new AV.Role();
26
+ }).not.to.throwError();
27
+ });
28
29
0 commit comments