Skip to content

Commit 1c5f27d

Browse files
readd misssing test
1 parent a2c98d3 commit 1c5f27d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

dapp/tests/e2e/app.test.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,19 @@ describe('sendTelegram', () => {
122122
);
123123
});
124124

125+
it('should fail if not empty senderName', async () => {
126+
process.env.IEXEC_REQUESTER_SECRET_1 = JSON.stringify({
127+
senderName: '',
128+
telegramContentMultiAddr:
129+
'/ipfs/QmVodr1Bxa2bTiz1pLmWjDrCeTEdGPfe58qRMRwErJDcRu',
130+
telegramContentEncryptionKey:
131+
'rjUmm5KQTwZ5oraBKMnmpgh6QM/qRR33kVF+Ct0/K6c=',
132+
});
133+
await expect(() => start()).rejects.toThrow(
134+
Error('Requester secret error: "senderName" is not allowed to be empty')
135+
);
136+
});
137+
125138
it('should send the telegram if senderName is undefined and set the default senderName to "iExec web3telegram"', async () => {
126139
process.env.IEXEC_REQUESTER_SECRET_1 = JSON.stringify({
127140
telegramContentMultiAddr:

0 commit comments

Comments
 (0)