File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff 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 :
You can’t perform that action at this time.
0 commit comments