User component shows anonymus if disabled

This commit is contained in:
Robert Schäfer 2019-03-15 17:03:31 +01:00
parent e6af5a11ab
commit 7bc3214d98
2 changed files with 7 additions and 1 deletions

View File

@ -73,6 +73,12 @@ describe('User.vue', () => {
beforeEach(() => {
propsData.user.disabled = true
})
it('renders anonymous user', () => {
const wrapper = Wrapper()
expect(wrapper.text()).not.toMatch('Tilda Swinton')
expect(wrapper.text()).toMatch('Anonymus')
})
})
})
})

View File

@ -1,5 +1,5 @@
<template>
<div v-if="!user">
<div v-if="!user || user.disabled">
<div style="display: inline-block; float: left; margin-right: 4px; height: 100%; vertical-align: middle;">
<ds-avatar
style="display: inline-block; vertical-align: middle;"