From f227715affc293fc5c5b4f1bef0c33e601df2b22 Mon Sep 17 00:00:00 2001 From: Pedro Romano Date: Mon, 11 Feb 2019 23:17:31 +0000 Subject: [PATCH] simple-cipher: test that messages longer than the key can be decoded. --- exercises/simple-cipher/simple-cipher.spec.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/exercises/simple-cipher/simple-cipher.spec.js b/exercises/simple-cipher/simple-cipher.spec.js index d6c4597a97..0cccb96909 100644 --- a/exercises/simple-cipher/simple-cipher.spec.js +++ b/exercises/simple-cipher/simple-cipher.spec.js @@ -116,8 +116,13 @@ describe('Substitution cipher', () => { expect(cipher.decode('zabcdefghi')).toEqual('zzzzzzzzzz'); }); - xtest('can handle messages longer than the key', () => { + xtest('can encode messages longer than the key', () => { expect(new Cipher('abc').encode('iamapandabear')) .toEqual('iboaqcnecbfcr'); }); + + xtest('can decode messages longer than the key', () => { + expect(new Cipher('abc').decode('iboaqcnecbfcr')) + .toEqual('iamapandabear'); + }); });