Skip to content
This repository has been archived by the owner on Oct 9, 2022. It is now read-only.

Commit

Permalink
Set default Gravatar to Mystery Person (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
BrookeDot committed Dec 29, 2020
1 parent a7c50fc commit fb7f66b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions js/__tests__/stores/user.spec.ts
Expand Up @@ -30,11 +30,11 @@ describe('stores/user', () => {

it('sets the current user’s avatar', () => {
userStore.setAvatar()
expect(userStore.current.avatar).toBe('https://www.gravatar.com/avatar/b9611f1bba1aacbe6f5de5856695a202?s=256')
expect(userStore.current.avatar).toBe('https://www.gravatar.com/avatar/b9611f1bba1aacbe6f5de5856695a202?s=256&d=mp')
})

it('sets a user’s avatar', () => {
userStore.setAvatar(users[1])
expect(users[1].avatar).toBe('https://www.gravatar.com/avatar/5024672cfe53f113b746e1923e373058?s=256')
expect(users[1].avatar).toBe('https://www.gravatar.com/avatar/5024672cfe53f113b746e1923e373058?s=256&d=mp')
})
})
2 changes: 1 addition & 1 deletion js/stores/user.ts
Expand Up @@ -52,7 +52,7 @@ export const userStore = {
*/
setAvatar (user?: User): void {
user = user || this.current
Vue.set(user, 'avatar', `https://www.gravatar.com/avatar/${md5(user.email)}?s=256`)
Vue.set(user, 'avatar', `https://www.gravatar.com/avatar/${md5(user.email)}?s=256&d=mp`)
},

login: async (email: string, password: string): Promise<User> => {
Expand Down

0 comments on commit fb7f66b

Please sign in to comment.