Merge pull request #1863 from Human-Connection/1645_case_insensitive_email

fix: search for email case-insensitively
This commit is contained in:
Wolfgang Huß 2019-10-14 11:01:26 +02:00 committed by GitHub
commit 3bb4d67350
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -49,6 +49,12 @@ describe('Users', () => {
expect(wrapper.vm.email).toEqual('email@example.org')
expect(wrapper.vm.filter).toBe(null)
})
it('email address is case-insensitive', async () => {
const wrapper = await searchAction(Wrapper(), { query: 'eMaiL@example.org' })
expect(wrapper.vm.email).toEqual('email@example.org')
expect(wrapper.vm.filter).toBe(null)
})
})
describe('query is just text', () => {

View File

@ -170,7 +170,7 @@ export default {
this.offset = 0
const { query } = formData
if (isemail.validate(query)) {
this.email = query
this.email = query.toLowerCase()
this.filter = null
} else {
this.email = null