diff --git a/src/graphql-schema.js b/src/graphql-schema.js index 830fda193..243d6b551 100644 --- a/src/graphql-schema.js +++ b/src/graphql-schema.js @@ -111,7 +111,7 @@ export const resolvers = { return Object.assign(currentUser, { token: generateJwt(currentUser) }) - } else throw new AuthenticationError('Incorrect username or password.') + } else throw new AuthenticationError('Incorrect email address or password.') }) } } diff --git a/src/graphql-schema.test.js b/src/graphql-schema.test.js index 6ce4658b9..52bbed901 100644 --- a/src/graphql-schema.test.js +++ b/src/graphql-schema.test.js @@ -55,21 +55,21 @@ describe.only('login', () => { }) describe('with a valid email but incorrect password', () => { - it('responds with "Wrong email/password combination"', async () => { + it('responds with "Incorrect email address or password."', async () => { try { await request(getHost(), mutation({email: 'test@example.org', password: 'wrong'})) } catch (error) { - expect(error.response.errors[0].message).toEqual('Wrong email/password combination') + expect(error.response.errors[0].message).toEqual('Incorrect email address or password.') } }) }) describe('with a non-existing email', () => { - it('responds with "Wrong email/password combination"', async () => { + it('responds with "Incorrect email address or password."', async () => { try { await request(getHost(), mutation({email: 'non-existent@example.org', password: 'wrong'})) } catch (error) { - expect(error.response.errors[0].message).toEqual('Wrong email/password combination') + expect(error.response.errors[0].message).toEqual('Incorrect email address or password.') } }) })