Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Commit 22aefea

Browse files
committed
extend range of status allowed/denied
see strongloop/loopback#301
1 parent ce17e46 commit 22aefea

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/helpers.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,15 +211,16 @@ _it.shouldBeAllowed = function() {
211211
it('should be allowed', function() {
212212
assert(this.req);
213213
assert(this.res);
214-
assert.notEqual(this.res.statusCode, 401);
214+
//if not in list
215+
assert([404,403,401].indexOf(this.res.statusCode) == -1);
215216
});
216217
}
217218

218219
_it.shouldBeDenied = function() {
219220
it('should not be allowed', function() {
220221
assert(this.res);
221-
var status = this.res.statusCode;
222-
assert(status === 401 || status === 404);
222+
//if in list
223+
assert([404,403,401].indexOf(this.res.statusCode) > -1);
223224
});
224225
}
225226

0 commit comments

Comments
 (0)