fix: fall back to date_created when published_at is null so every article shows a date
This commit is contained in:
@@ -12,6 +12,7 @@ const mockArticle: Article = {
|
||||
excerpt: 'The beloved series returns.',
|
||||
featured_image: null,
|
||||
published_at: '2026-05-28T00:00:00Z',
|
||||
date_created: '2026-05-28T00:00:00Z',
|
||||
is_featured: false,
|
||||
seo_title: null,
|
||||
seo_description: null,
|
||||
|
||||
@@ -47,7 +47,7 @@ describe('getArticleBySlug', () => {
|
||||
{
|
||||
id: '1', title: 'Frieren S2', slug: 'frieren-s2', status: 'published',
|
||||
content: '<p>Body</p>', excerpt: 'Short', featured_image: null,
|
||||
published_at: '2026-05-28T00:00:00Z', is_featured: false,
|
||||
published_at: '2026-05-28T00:00:00Z', date_created: '2026-05-28T00:00:00Z', is_featured: false,
|
||||
seo_title: null, seo_description: null,
|
||||
category: { id: '1', name: 'Anime', slug: 'anime', description: null },
|
||||
tags: [],
|
||||
|
||||
Reference in New Issue
Block a user