mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
fix: search for email case-insensitively
This commit is contained in:
parent
af7b52e212
commit
c1a696577b
@ -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', () => {
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user