fix(fc3b): SourceFormDialog + SubscriptionsView read platforms store; drop sources.loadPlatforms
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -41,16 +41,6 @@ describe('sources store', () => {
|
||||
expect(calls[0]).toContain('artist_id=7')
|
||||
})
|
||||
|
||||
it('loadPlatforms caches the platforms list', async () => {
|
||||
const s = useSourcesStore()
|
||||
let n = 0
|
||||
stubFetch(() => { n++; return { status: 200, body: { platforms: ['patreon'] } } })
|
||||
await s.loadPlatforms()
|
||||
await s.loadPlatforms() // second call should hit cache
|
||||
expect(n).toBe(1)
|
||||
expect(s.platforms).toEqual(['patreon'])
|
||||
})
|
||||
|
||||
it('create invalidates the all-cache and the artist-cache', async () => {
|
||||
const s = useSourcesStore()
|
||||
s.byArtist.set(null, [])
|
||||
|
||||
Reference in New Issue
Block a user