add: otp class test

This commit is contained in:
lancegin
2017-06-29 14:52:22 +08:00
parent 5544c86620
commit 8926483c06

View File

@@ -0,0 +1,14 @@
var otp = require('../lib/otp');
var assert = require('assert');
describe('OTP module test', function() {
var OTP = otp.OTP;
var a = new OTP("BASE32_ENCODED_SECRET");
describe('generate_otp() function', function() {
it("should print 'OTP.generate_otp'", function() {
assert.equal("OTP.generate_otp", a.generate_otp())
});
});
});