fix(cms): remove unpublished content fallbacks
This commit is contained in:
16
tests/int/press-collection-items.int.spec.ts
Normal file
16
tests/int/press-collection-items.int.spec.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
|
||||
import { pressEventsFromCms, pressNewsFromCms } from '@/spa/pressCollectionItems'
|
||||
import { pressIndexContent } from '@/spa/pressIndexContent'
|
||||
|
||||
describe('press collection items', () => {
|
||||
it('does not replace an empty published events collection with demo event rows', () => {
|
||||
expect(
|
||||
pressEventsFromCms([], '/images/event-placeholder.jpg', {}, pressIndexContent.events),
|
||||
).toEqual([])
|
||||
})
|
||||
|
||||
it('does not replace an empty published posts collection with demo news cards', () => {
|
||||
expect(pressNewsFromCms([], '/images/news-placeholder.jpg', pressIndexContent.news)).toEqual([])
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user