From a593c2cb8cf77ea1d894a941c29858630e703a36 Mon Sep 17 00:00:00 2001 From: shpuld Date: Mon, 28 Jan 2019 21:21:11 +0200 Subject: Make userByName case-insensitive --- test/unit/specs/modules/users.spec.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test/unit/specs/modules/users.spec.js') diff --git a/test/unit/specs/modules/users.spec.js b/test/unit/specs/modules/users.spec.js index b0f3c51e..4d49ee24 100644 --- a/test/unit/specs/modules/users.spec.js +++ b/test/unit/specs/modules/users.spec.js @@ -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', () => { -- cgit v1.2.3-70-g09d2