diff options
| author | Serghei Iakovlev <egrep@protonmail.ch> | 2024-09-28 10:11:02 +0200 |
|---|---|---|
| committer | Serghei Iakovlev <git@serghei.pl> | 2024-09-28 10:12:49 +0200 |
| commit | fedb40603459d173135c3cc165a3e86f0e1abb66 (patch) | |
| tree | 853bf918756b1599781c5390ecb01846a6d50a29 /tests | |
| parent | fa39098ed994bffd3b3560199a3d65d774e48d15 (diff) | |
| download | gohugo-theme-ed-fedb40603459d173135c3cc165a3e86f0e1abb66.tar.gz | |
Use more natural path to feeds
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/feed-atom.spec.js | 6 | ||||
| -rw-r--r-- | tests/feed-rss.spec.js | 7 |
2 files changed, 6 insertions, 7 deletions
diff --git a/tests/feed-atom.spec.js b/tests/feed-atom.spec.js index 4e62c2f..7a26a60 100644 --- a/tests/feed-atom.spec.js +++ b/tests/feed-atom.spec.js @@ -6,7 +6,7 @@ const jsdom = require('jsdom'); const { JSDOM } = jsdom; test('atom feed has correct updated field', async ({ page }) => { - await page.goto('/feeds/feed.atom.xml'); + await page.goto('/atom.xml'); // Get the content of the page const content = await page.content(); @@ -32,7 +32,7 @@ test('atom feed has correct updated field', async ({ page }) => { }); test('atom feed has correct author information', async ({ page }) => { - await page.goto('/feeds/feed.atom.xml'); + await page.goto('/atom.xml'); // Get the content of the page const content = await page.content(); @@ -71,7 +71,7 @@ test('atom feed has correct author information', async ({ page }) => { }); test('atom feed entries have correct published and updated fields', async ({ page }) => { - await page.goto('/feeds/feed.atom.xml'); + await page.goto('/atom.xml'); // Get the content of the page const content = await page.content(); diff --git a/tests/feed-rss.spec.js b/tests/feed-rss.spec.js index f9f36bb..de06da1 100644 --- a/tests/feed-rss.spec.js +++ b/tests/feed-rss.spec.js @@ -6,7 +6,7 @@ const jsdom = require('jsdom'); const { JSDOM } = jsdom; test('rss feed has correct lastBuildDate field', async ({ page }) => { - await page.goto('/feeds/feed.rss.xml'); + await page.goto('/rss.xml'); // Get the content of the page const content = await page.content(); @@ -32,7 +32,7 @@ test('rss feed has correct lastBuildDate field', async ({ page }) => { }); test('rss feed items have correct fields', async ({ page }) => { - await page.goto('/feeds/feed.rss.xml'); + await page.goto('/rss.xml'); // Get the content of the page const content = await page.content(); @@ -73,8 +73,7 @@ test('rss feed items have correct fields', async ({ page }) => { // Check for category element const categoryElement = item.querySelector('category'); - expect(categoryElement).not.toBeNull(); - expect(categoryElement.textContent.trim()).not.toBe(''); + expect(categoryElement).toBeNull(); // Check for guid element const guidElement = item.querySelector('guid'); |
