From b4248afd98ff61b251c9dfea7d5578bd62fc660d Mon Sep 17 00:00:00 2001 From: Mikunj Date: Wed, 16 Jan 2019 15:29:08 +1100 Subject: [PATCH] Updated a profile test. --- test/models/profile_test.js | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/test/models/profile_test.js b/test/models/profile_test.js index dd20317da..b30d8dfc8 100644 --- a/test/models/profile_test.js +++ b/test/models/profile_test.js @@ -92,30 +92,12 @@ describe('Profile', () => { }); it('trims the display name', async () => { - const values = [ - { - current: ' prefix', - expected: 'prefix', - }, - { - current: 'suffix ', - expected: 'suffix', - }, - { - current: 'in middle', - expected: 'in middle', - }, - ]; - - for(let i = 0; i < values.length; i += 1) { - const { current, expected } = values[i]; - await storage.setProfileName(current); - const profile = storage.getLocalProfile(); - const name = { - displayName: expected, - }; - assert.deepEqual(name, profile.name); - } + await storage.setProfileName(' in middle '); + const profile = storage.getLocalProfile(); + const name = { + displayName: 'in middle', + }; + assert.deepEqual(name, profile.name); }); it('unsets the name property if it is empty', async () => {