mirror of
https://github.com/appium/appium.git
synced 2026-05-07 19:40:01 -05:00
make sure /sessions doesn't return false hard-coded information
Fixes #400
This commit is contained in:
@@ -19,7 +19,7 @@ var describeWithSession = function(desc, tests) {
|
||||
should.not.exist(err);
|
||||
res.statusCode.should.equal(303);
|
||||
should.ok(res.headers.location);
|
||||
request.get(serverUrl + res.headers.location, function(err, res, body) {
|
||||
request.get(res.headers.location, function(err, res, body) {
|
||||
should.not.exist(err);
|
||||
res.statusCode.should.equal(200);
|
||||
body = JSON.parse(body);
|
||||
@@ -54,6 +54,15 @@ describe('JSONWP request', function() {
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('to get list of sessions', function() {
|
||||
it('should return empty list if no session active', function(done) {
|
||||
request.get(serverHub + 's', function(err, res, body) {
|
||||
should.not.exist(err);
|
||||
JSON.parse(body).value.should.eql([]);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('to a not-yet-implemented url', function() {
|
||||
it('should respond with 501 Not Implemented', function(done) {
|
||||
var url = serverHub + '/fakesessid/ime/deactivate';
|
||||
|
||||
Reference in New Issue
Block a user