diff --git a/resources/assets/js/tests/components/main-wrapper/main-content/index.spec.js b/resources/assets/js/tests/components/main-wrapper/main-content/index.spec.js new file mode 100644 index 00000000..7edd6ed6 --- /dev/null +++ b/resources/assets/js/tests/components/main-wrapper/main-content/index.spec.js @@ -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) + }) +})