add test for support of invite urls

pull/1/head
ansuz 7 years ago
parent 4c0049ad55
commit 0a14c715ad

@ -237,6 +237,14 @@ define([
!secret.hashData.present); !secret.hashData.present);
}, "test support for trailing slashes in version 1 hash failed to parse"); }, "test support for trailing slashes in version 1 hash failed to parse");
assert(function (cb) {
var secret = Cryptpad.parsePadUrl('/invite/#/1/ilrOtygzDVoUSRpOOJrUuQ/e8jvf36S3chzkkcaMrLSW7PPrz7VDp85lIFNI26dTmr=/');
var hd = secret.hashData;
cb(hd.channel === "ilrOtygzDVoUSRpOOJrUuQ" &&
hd.pubkey === "e8jvf36S3chzkkcaMrLSW7PPrz7VDp85lIFNI26dTmr=" &&
hd.type === 'invite');
}, "test support for invite urls");
assert(function (cb) { assert(function (cb) {
// TODO // TODO
return cb(true); return cb(true);

Loading…
Cancel
Save