diff --git a/src/frontends/tui/commands.test.ts b/src/frontends/tui/commands.test.ts index 2914116..9f7c1f8 100644 --- a/src/frontends/tui/commands.test.ts +++ b/src/frontends/tui/commands.test.ts @@ -108,3 +108,25 @@ describe('getHelpText', () => { expect(help).toContain('/quit'); }); }); + +describe('/pair command', () => { + it('parses /pair as list', () => { + expect(parseCommand('/pair')).toEqual({ type: 'pair', action: 'list' }); + }); + + it('parses /pair list', () => { + expect(parseCommand('/pair list')).toEqual({ type: 'pair', action: 'list' }); + }); + + it('parses /pair generate without label', () => { + expect(parseCommand('/pair generate')).toEqual({ type: 'pair', action: 'generate', args: undefined }); + }); + + it('parses /pair generate with label', () => { + expect(parseCommand('/pair generate for alice')).toEqual({ type: 'pair', action: 'generate', args: 'for alice' }); + }); + + it('parses /pair revoke with channel and sender', () => { + expect(parseCommand('/pair revoke telegram 12345')).toEqual({ type: 'pair', action: 'revoke', args: 'telegram 12345' }); + }); +});