Home Reference Source

application/__mocks__/current-user.js

const MockCurrentUser = {

    id() {
        return 1;
    },
    getId() {
        return this.id();
    },

    uuid() {
        return '3289032-fdar392-3232ds';
    },
    getUuid() {
        return this.uuid();
    },

    /**
     * Get user name
     * @return {string}
     */
    name() {
        return 'Test Testerson';
    },
    getName() {
        return this.name();
    },

    /**
     * Get user email
     * @return {string}
     */
    email() {
        return 'test@example.com';
    },
    getEmail() {
        return this.email();
    },

    /**
     * Get user API private token
     * @return {string}
     */
    privateToken() {
        return 1;
    },
    getPrivateToken() {
        return this.privateToken();
    },

    /**
     * Get user API public token
     * @return {string}
     */
    publicToken() {
        return 2;
    },
    getPublicToken() {
        return this.publicToken();
    },

    /**
     * Get user Gravatar URL
     * @return {string}
     */
    gravatar() {
        return false;
    },
    getGravatar() {
        return this.gravatar();
    }

};

export default MockCurrentUser;