Skip to content

Commit

Permalink
Merge pull request #10 from mycsHQ/master
Browse files Browse the repository at this point in the history
Cleanup tests, unskip some tests and enable nodejs 4.2 on travis CI
  • Loading branch information
toymachiner62 committed Dec 9, 2015
2 parents 979a947 + d74b2d8 commit baab500
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 35 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
sudo: false
language: node_js
node_js:
- 0.10
- 4.2.0
- 0.10
47 changes: 13 additions & 34 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,6 @@ describe('hapi-authorization', function() {

server.register(plugin, {}, function(err) {
server.inject({method: 'GET', url: '/'}, function(res) {
console.log('err = ');
console.log(err);
console.log('res = ');
console.log(res);
internals.asyncCheck(function() {
expect(res.statusCode).to.equal(200);
}, done);
Expand Down Expand Up @@ -216,11 +212,7 @@ describe('hapi-authorization', function() {
server.route({ method: 'GET', path: '/', handler: function (request, reply) { reply("TEST"); } });
server.register(plugin, {}, function(err) {

console.log('err = ');
console.log(err);

server.inject('/', function(res) {
//console.log(res);

expect(res.payload).to.equal("TEST");
done();
Expand Down Expand Up @@ -595,8 +587,7 @@ describe('hapi-authorization', function() {
});
});

// TODO
it.skip('Returns an error when a user\'s role is unsuited due to hierarchy being disabled', function(done) {
it('Returns an error when a user\'s role is unsuited due to hierarchy being disabled', function(done) {
var server = new Hapi.Server();
server.connection();
server.auth.scheme('custom', internals.authSchema);
Expand Down Expand Up @@ -631,8 +622,7 @@ describe('hapi-authorization', function() {
});
});

// TODO
it.skip('Returns an error when a user\'s role is unsuited due to hierarchy being disabled', function(done) {
it('Returns an error when a user\'s role is unsuited due to hierarchy being disabled', function(done) {
var server = new Hapi.Server();
server.connection();
server.auth.scheme('custom', internals.authSchema);
Expand Down Expand Up @@ -667,8 +657,7 @@ describe('hapi-authorization', function() {
});
});

// TODO
it.skip('Returns an error when any of a user\'s roles are unsuited due to hierarchy being disabled', function(done) {
it('Returns an error when any of a user\'s roles are unsuited due to hierarchy being disabled', function(done) {
var server = new Hapi.Server();
server.connection();
server.auth.scheme('custom', internals.authSchema);
Expand Down Expand Up @@ -1516,8 +1505,7 @@ describe('hapi-authorization', function() {
});
});

// TODO
it.skip('Returns an error when a user\'s role is unsuited due to hierarchy being disabled', function(done) {
it('Returns an error when a user\'s role is unsuited due to hierarchy being disabled', function(done) {
var server = new Hapi.Server();
server.connection();
server.auth.scheme('custom', internals.authSchema);
Expand Down Expand Up @@ -1552,8 +1540,7 @@ describe('hapi-authorization', function() {
});
});

// TODO
it.skip('Returns an error when a user\'s role is unsuited due to hierarchy being disabled', function(done) {
it('Returns an error when a user\'s role is unsuited due to hierarchy being disabled', function(done) {
var server = new Hapi.Server();
server.connection();
server.auth.scheme('custom', internals.authSchema);
Expand Down Expand Up @@ -1588,8 +1575,7 @@ describe('hapi-authorization', function() {
});
});

// TODO
it.skip('Returns an error when any of a user\'s roles are unsuited due to hierarchy being disabled', function(done) {
it('Returns an error when any of a user\'s roles are unsuited due to hierarchy being disabled', function(done) {
var server = new Hapi.Server();
server.connection();
server.auth.scheme('custom', internals.authSchema);
Expand Down Expand Up @@ -2296,8 +2282,7 @@ describe('hapi-authorization', function() {
});
});

// TODO
it.skip('Returns an error when a user\'s role is unsuited due to hierarchy being disabled', function(done) {
it('Returns an error when a user\'s role is unsuited due to hierarchy being disabled', function(done) {
var server = new Hapi.Server();
server.connection();
server.auth.scheme('custom', internals.authSchema);
Expand Down Expand Up @@ -2332,8 +2317,7 @@ describe('hapi-authorization', function() {
});
});

// TODO
it.skip('Returns an error when a user\'s role is unsuited due to hierarchy being disabled', function(done) {
it('Returns an error when a user\'s role is unsuited due to hierarchy being disabled', function(done) {
var server = new Hapi.Server();
server.connection();
server.auth.scheme('custom', internals.authSchema);
Expand Down Expand Up @@ -2368,8 +2352,7 @@ describe('hapi-authorization', function() {
});
});

// TODO
it.skip('Returns an error when any of a user\'s roles are unsuited due to hierarchy being disabled', function(done) {
it('Returns an error when any of a user\'s roles are unsuited due to hierarchy being disabled', function(done) {
var server = new Hapi.Server();
server.connection();
server.auth.scheme('custom', internals.authSchema);
Expand Down Expand Up @@ -3111,8 +3094,7 @@ describe('hapi-authorization', function() {
});
});

// TODO
it.skip('Returns an error when a user\'s role is unsuited due to hierarchy being disabled', function(done) {
it('Returns an error when a user\'s role is unsuited due to hierarchy being disabled', function(done) {
var server = new Hapi.Server();
server.connection();
server.auth.scheme('custom', internals.authSchema);
Expand Down Expand Up @@ -3855,8 +3837,7 @@ describe('hapi-authorization', function() {
});
});

// TODO
it.skip('Returns an error when a user\'s role is unsuited due to hierarchy being disabled', function(done) {
it('Returns an error when a user\'s role is unsuited due to hierarchy being disabled', function(done) {
var server = new Hapi.Server();
server.connection();
server.auth.scheme('custom', internals.authSchema);
Expand Down Expand Up @@ -3891,8 +3872,7 @@ describe('hapi-authorization', function() {
});
});

// TODO
it.skip('Returns an error when a user\'s role is unsuited due to hierarchy being disabled', function(done) {
it('Returns an error when a user\'s role is unsuited due to hierarchy being disabled', function(done) {
var server = new Hapi.Server();
server.connection();
server.auth.scheme('custom', internals.authSchema);
Expand Down Expand Up @@ -3927,8 +3907,7 @@ describe('hapi-authorization', function() {
});
});

// TODO
it.skip('Returns an error when any of a user\'s roles are unsuited due to hierarchy being disabled', function(done) {
it('Returns an error when any of a user\'s roles are unsuited due to hierarchy being disabled', function(done) {
var server = new Hapi.Server();
server.connection();
server.auth.scheme('custom', internals.authSchema);
Expand Down

0 comments on commit baab500

Please sign in to comment.