mirror of
https://github.com/koel/koel
synced 2024-12-20 09:33:23 +00:00
abb0438c8d
This fixes a bug with Spotify integration that occurs if an installation isn't connected to Last.fm. Closing #1730 and #1653.
23 lines
718 B
TypeScript
23 lines
718 B
TypeScript
import { expect, it } from 'vitest'
|
|
import UnitTestCase from '@/__tests__/UnitTestCase'
|
|
import { commonStore } from '@/stores'
|
|
import SpotifyIntegration from './SpotifyIntegration.vue'
|
|
|
|
new class extends UnitTestCase {
|
|
protected test () {
|
|
it.each<[boolean, boolean]>([[false, false], [false, true], [true, false], [true, true]])
|
|
('renders proper content with Spotify integration status %s, current user admin status %s',
|
|
(useSpotify, isAdmin) => {
|
|
commonStore.state.use_spotify = useSpotify
|
|
|
|
if (isAdmin) {
|
|
this.actingAsAdmin()
|
|
} else {
|
|
this.actingAs()
|
|
}
|
|
|
|
expect(this.render(SpotifyIntegration).html()).toMatchSnapshot();
|
|
}
|
|
)
|
|
}
|
|
}
|