const chai = require('chai');
const expect = chai.expect;
const sinon = require('sinon');

const proxyquire = require('proxyquire');
const confStub = {
	redis: {}
};

describe('IsTokenRevoked', function () {
	it('should return false if the token is not revoked', function (done) {
		const SessionService = require('./session-service');
		const email = "foo@bar.com";
		const tokenId = "validToken";
		SessionService.isTokenRevoked(email, tokenId, (err, bool) => {
			expect(err).to.be.null;
			expect(bool).to.be.false;
			done();
		});
	});

	it('should return false if the token is revoked in Redis', function (done) {
		const SessionService = proxyquire('./session-service', {'../config/dev.js': confStub});

		const email = "foo@bar.com";
		const tokenId = "validToken";
		SessionService.isTokenRevoked(email, tokenId, (err, bool) => {
			expect(err).to.be.null;
			expect(bool).to.be.false;
			done();
		});
	});
});

@@ -537,16 +537,19 @@
 %0A%09%7D);%0A%0A%09
+// 
 it('shou
@@ -610,32 +610,35 @@
 ction (done) %7B%0A%09
+// 
 %09const SessionSe
@@ -710,18 +710,27 @@
 Stub%7D);%0A
-%0A%09
+    //%0A%09// 
 %09const e
@@ -744,32 +744,35 @@
 %22foo@bar.com%22;%0A%09
+// 
 %09const tokenId =
@@ -779,32 +779,35 @@
  %22validToken%22;%0A%09
+// 
 %09SessionService.
@@ -847,32 +847,35 @@
 rr, bool) =%3E %7B%0A%09
+// 
 %09%09expect(err).to
@@ -877,32 +877,35 @@
 r).to.be.null;%0A%09
+// 
 %09%09expect(bool).t
@@ -909,32 +909,35 @@
 ).to.be.false;%0A%09
+// 
 %09%09done();%0A%09%09%7D);%0A
@@ -927,26 +927,32 @@
  %09%09done();%0A%09
+// 
 %09%7D);%0A%09
+// 
 %7D);%0A%7D);%0A

Remove redis test for build platform travis