Add main-wrapper/main-content/index tests

This commit is contained in:
Phan An 2017-12-15 00:57:51 +01:00
parent f86f5f9a6f
commit 7c9518125b

View file

@ -0,0 +1,16 @@
import Component from '@/components/main-wrapper/main-content/index.vue'
import { event } from '@/utils'
import factory from '@/tests/factory'
describe('components/main-wrapper/main-content/index', () => {
it('has a translucent image per song/album', () => {
const wrapper = shallow(Component)
const song = factory('song', {
album: factory('album', {
cover: 'http://foo/bar.jpg'
})
})
event.emit('song:played', song)
wrapper.vm.albumCover.should.equal(song.album.cover)
})
})