Make userByName case-insensitive
This commit is contained in:
parent
bb2ee04f04
commit
a593c2cb8c
2 changed files with 12 additions and 1 deletions
|
@ -45,6 +45,17 @@ describe('The users module', () => {
|
|||
const expected = { screen_name: 'Guy', id: '1' }
|
||||
expect(getters.userByName(state)(name)).to.eql(expected)
|
||||
})
|
||||
|
||||
it('returns user with matching screen_name with different case', () => {
|
||||
const state = {
|
||||
users: [
|
||||
{ screen_name: 'guy', id: '1' }
|
||||
]
|
||||
}
|
||||
const name = 'Guy'
|
||||
const expected = { screen_name: 'guy', id: '1' }
|
||||
expect(getters.userByName(state)(name)).to.eql(expected)
|
||||
})
|
||||
})
|
||||
|
||||
describe('getUserById', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue