From 7c9518125bead761e670a538f9fcc75a93324e51 Mon Sep 17 00:00:00 2001 From: Phan An Date: Fri, 15 Dec 2017 00:57:51 +0100 Subject: [PATCH] Add main-wrapper/main-content/index tests --- .../main-wrapper/main-content/index.spec.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 resources/assets/js/tests/components/main-wrapper/main-content/index.spec.js 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) + }) +})