add test for support of invite urls

This commit is contained in:
ansuz 2017-10-30 14:40:43 +01:00
parent 4c0049ad55
commit 0a14c715ad
1 changed files with 8 additions and 0 deletions

View File

@ -237,6 +237,14 @@ define([
!secret.hashData.present);
}, "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) {
// TODO
return cb(true);