updated rust version, minor fixes
This commit is contained in:
@@ -59,6 +59,45 @@ describe('RssFeeds', () => {
|
||||
expect(wrapper.text()).not.toContain('No unread articles.')
|
||||
})
|
||||
|
||||
it('sorts articles by date across feeds, newest first', async () => {
|
||||
axios.get.mockResolvedValueOnce({
|
||||
data: {
|
||||
feeds: [
|
||||
{
|
||||
title: 'Old Feed',
|
||||
items: [
|
||||
{
|
||||
id: 1,
|
||||
title: 'Older article',
|
||||
content: '<p>old</p>',
|
||||
url: 'https://example.test/1',
|
||||
timestamp: '2026-01-01 10:00:00',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'New Feed',
|
||||
items: [
|
||||
{
|
||||
id: 2,
|
||||
title: 'Newer article',
|
||||
content: '<p>new</p>',
|
||||
url: 'https://example.test/2',
|
||||
timestamp: '2026-02-01 10:00:00',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
})
|
||||
|
||||
const wrapper = mount(RssFeeds)
|
||||
await flushPromises()
|
||||
|
||||
const titles = wrapper.findAll('.feed-title').map(el => el.text())
|
||||
expect(titles).toEqual(['Newer article', 'Older article'])
|
||||
})
|
||||
|
||||
it('syncs feeds for the current user', async () => {
|
||||
axios.get.mockResolvedValue({ data: { feeds: [] } })
|
||||
axios.post.mockResolvedValueOnce({ status: 200 })
|
||||
|
||||
Reference in New Issue
Block a user