diff options
Diffstat (limited to 'spec/javascripts/vue_shared/components/identicon_spec.js')
-rw-r--r-- | spec/javascripts/vue_shared/components/identicon_spec.js | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/spec/javascripts/vue_shared/components/identicon_spec.js b/spec/javascripts/vue_shared/components/identicon_spec.js index 647680f00f7..0719800c682 100644 --- a/spec/javascripts/vue_shared/components/identicon_spec.js +++ b/spec/javascripts/vue_shared/components/identicon_spec.js @@ -25,19 +25,12 @@ describe('IdenticonComponent', () => { vm.$destroy(); }); - describe('identiconStyles', () => { - it('should return styles attribute value with `background-color` property', () => { + describe('identiconBackgroundClass', () => { + it('should return bg class based on entityId', () => { vm.entityId = 4; - expect(vm.identiconStyles).toBeDefined(); - expect(vm.identiconStyles.indexOf('background-color: #E0F2F1;') > -1).toBeTruthy(); - }); - - it('should return styles attribute value with `color` property', () => { - vm.entityId = 4; - - expect(vm.identiconStyles).toBeDefined(); - expect(vm.identiconStyles.indexOf('color: #555;') > -1).toBeTruthy(); + expect(vm.identiconBackgroundClass).toBeDefined(); + expect(vm.identiconBackgroundClass).toBe('bg5'); }); }); @@ -58,7 +51,7 @@ describe('IdenticonComponent', () => { expect(vm.$el.nodeName).toBe('DIV'); expect(vm.$el.classList.contains('identicon')).toBeTruthy(); expect(vm.$el.classList.contains('s40')).toBeTruthy(); - expect(vm.$el.getAttribute('style').indexOf('background-color') > -1).toBeTruthy(); + expect(vm.$el.classList.contains('bg2')).toBeTruthy(); vm.$destroy(); }); |