mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Modal coverage
This commit is contained in:
parent
b2bc5b9447
commit
eb4ec2499e
@ -131,6 +131,42 @@ describe('Modal.vue', () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
describe('store/modal data contains an user', () => {
|
||||||
|
it('passes user name to report modal', () => {
|
||||||
|
state.data = {
|
||||||
|
type: 'user',
|
||||||
|
resource: {
|
||||||
|
id: 'u456',
|
||||||
|
name: 'Username',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
wrapper = Wrapper()
|
||||||
|
expect(wrapper.find(DisableModal).props()).toEqual({
|
||||||
|
type: 'user',
|
||||||
|
name: 'Username',
|
||||||
|
id: 'u456',
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
describe('store/modal data contains no valid datatype', () => {
|
||||||
|
it('passes something as datatype to modal', () => {
|
||||||
|
state.data = {
|
||||||
|
type: 'something',
|
||||||
|
resource: {
|
||||||
|
id: 's456',
|
||||||
|
name: 'Username',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
wrapper = Wrapper()
|
||||||
|
expect(wrapper.find(DisableModal).props()).toEqual({
|
||||||
|
type: 'something',
|
||||||
|
name: null,
|
||||||
|
id: 's456',
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user