Skip to content

Commit e096569

Browse files
committed
Add test for empty token in body
1 parent 9ff9017 commit e096569

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/authorise.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,17 @@ describe('Authorise', function() {
137137
.expect(400, /only one method may be used/i, done);
138138
});
139139

140+
it('should allow exactly one method (post: query + empty body)', function (done) {
141+
var app = bootstrap('mockValid');
142+
143+
request(app)
144+
.post('/?access_token=thom')
145+
.send({
146+
access_token: ''
147+
})
148+
.expect(400, /only one method may be used/i, done);
149+
});
150+
140151
it('should detect expired token', function (done){
141152
var app = bootstrap({
142153
model: {

0 commit comments

Comments
 (0)