Feature: Agent Profile Update with avatar (#449)

* Feature: Agent Profile Update with avatar
* Add Update Profile with name, avatar, email and password
This commit is contained in:
Pranav Raj S
2020-02-16 17:20:38 +05:30
committed by GitHub
parent e61ba95cf7
commit c4e2a84f65
25 changed files with 584 additions and 133 deletions

View File

@@ -0,0 +1,20 @@
import { getters } from '../../auth';
import '../../../../routes';
jest.mock('../../../../routes', () => {});
describe('#getters', () => {
it('isLoggedIn', () => {
expect(getters.isLoggedIn({ currentUser: { id: null } })).toEqual(false);
expect(getters.isLoggedIn({ currentUser: { id: 1 } })).toEqual(true);
});
it('getCurrentUserID', () => {
expect(getters.getCurrentUserID({ currentUser: { id: 1 } })).toEqual(1);
});
it('getCurrentUser', () => {
expect(
getters.getCurrentUser({ currentUser: { id: 1, name: 'Pranav' } })
).toEqual({ id: 1, name: 'Pranav' });
});
});