Link-and-sync
This commit is contained in:
parent
455ff88918
commit
6565daa5c8
25 changed files with 388 additions and 59 deletions
|
@ -98,16 +98,40 @@ describe('signalRoutes', () => {
|
|||
check(`sgnl://joingroup#${fooNoSlash}`, result);
|
||||
});
|
||||
|
||||
it('linkDevice', () => {
|
||||
it('linkDevice without capabilities', () => {
|
||||
const result: ParsedSignalRoute = {
|
||||
key: 'linkDevice',
|
||||
args: { uuid: foo, pubKey: foo },
|
||||
args: { uuid: foo, pubKey: foo, capabilities: [] },
|
||||
};
|
||||
const check = createCheck({ hasWebUrl: false });
|
||||
check(`sgnl://linkdevice/?uuid=${foo}&pub_key=${foo}`, result);
|
||||
check(`sgnl://linkdevice?uuid=${foo}&pub_key=${foo}`, result);
|
||||
});
|
||||
|
||||
it('linkDevice with one capability', () => {
|
||||
const result: ParsedSignalRoute = {
|
||||
key: 'linkDevice',
|
||||
args: { uuid: foo, pubKey: foo, capabilities: ['backup'] },
|
||||
};
|
||||
const check = createCheck({ hasWebUrl: false });
|
||||
check(
|
||||
`sgnl://linkdevice/?uuid=${foo}&pub_key=${foo}&capabilities=backup`,
|
||||
result
|
||||
);
|
||||
});
|
||||
|
||||
it('linkDevice with multiple capabilities', () => {
|
||||
const result: ParsedSignalRoute = {
|
||||
key: 'linkDevice',
|
||||
args: { uuid: foo, pubKey: foo, capabilities: ['a', 'b'] },
|
||||
};
|
||||
const check = createCheck({ hasWebUrl: false });
|
||||
check(
|
||||
`sgnl://linkdevice/?uuid=${foo}&pub_key=${foo}&capabilities=a%2Cb`,
|
||||
result
|
||||
);
|
||||
});
|
||||
|
||||
it('captcha', () => {
|
||||
const captchaId =
|
||||
'signal-hcaptcha.Foo-bAr_baz.challenge.fOo-bAR_baZ.fOO-BaR_baz';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue