fix: Facebook reauthorization mailer (#4695)
This commit is contained in:
@@ -35,3 +35,10 @@ export const getInboxClassByType = (type, phoneNumber) => {
|
||||
return 'chat';
|
||||
}
|
||||
};
|
||||
|
||||
export const getInboxWarningIconClass = (type, reauthorizationRequired) => {
|
||||
if (type === INBOX_TYPES.FB && reauthorizationRequired) {
|
||||
return 'warning';
|
||||
}
|
||||
return '';
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { getInboxClassByType } from '../inbox';
|
||||
import { getInboxClassByType, getInboxWarningIconClass } from '../inbox';
|
||||
|
||||
describe('#Inbox Helpers', () => {
|
||||
describe('getInboxClassByType', () => {
|
||||
@@ -34,4 +34,12 @@ describe('#Inbox Helpers', () => {
|
||||
expect(getInboxClassByType('Channel::Email')).toEqual('mail');
|
||||
});
|
||||
});
|
||||
|
||||
describe('getInboxWarningIconClass', () => {
|
||||
it('should return correct class for warning', () => {
|
||||
expect(getInboxWarningIconClass('Channel::FacebookPage', true)).toEqual(
|
||||
'warning'
|
||||
);
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user