fix: Facebook reauthorization mailer (#4695)

This commit is contained in:
Tejaswini Chile
2022-06-07 17:50:51 +05:30
committed by GitHub
parent bad24f97ab
commit 772d92a4d3
9 changed files with 49 additions and 5 deletions

View File

@@ -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 '';
};

View File

@@ -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'
);
});
})
});