fix: Set cc, bcc default to empty string if unavailable (#3387)
This commit is contained in:
parent
acb06e7df6
commit
809509404b
2 changed files with 8 additions and 4 deletions
|
@ -35,12 +35,14 @@ describe('#ConversationAPI', () => {
|
|||
message: 'test content',
|
||||
echoId: 12,
|
||||
isPrivate: true,
|
||||
|
||||
file: new Blob(['test-content'], { type: 'application/pdf' }),
|
||||
});
|
||||
expect(formPayload).toBeInstanceOf(FormData);
|
||||
expect(formPayload.get('content')).toEqual('test content');
|
||||
expect(formPayload.get('echo_id')).toEqual('12');
|
||||
expect(formPayload.get('private')).toEqual('true');
|
||||
expect(formPayload.get('cc_emails')).toEqual('');
|
||||
});
|
||||
|
||||
it('builds object payload if file is not available', () => {
|
||||
|
@ -56,6 +58,8 @@ describe('#ConversationAPI', () => {
|
|||
private: false,
|
||||
echo_id: 12,
|
||||
content_attributes: { in_reply_to: 12 },
|
||||
bcc_emails: '',
|
||||
cc_emails: '',
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue