aboutsummaryrefslogtreecommitdiff
path: root/src/components/tag
diff options
context:
space:
mode:
authorRuben Beltran del Rio <ruben@unlimited.pizza>2021-04-22 00:58:09 +0200
committerRuben Beltran del Rio <ruben@unlimited.pizza>2021-04-22 00:58:09 +0200
commit4e6be9f49b9697d9577014b3ee2b7988129823a9 (patch)
tree5317704cc353ade186eaafbf13d377285828d92e /src/components/tag
parentccfa62b1a1c79cad28aa4cb05ea560be535e601f (diff)
Add test for forum topic list
Also adds URL test for tag topic list
Diffstat (limited to 'src/components/tag')
-rw-r--r--src/components/tag/tag.test.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/components/tag/tag.test.js b/src/components/tag/tag.test.js
index 3f19598..a2b6e0d 100644
--- a/src/components/tag/tag.test.js
+++ b/src/components/tag/tag.test.js
@@ -47,4 +47,12 @@ describe('Tag component', () => {
expect(internals.results.getByText('And its companion'))
.toBeVisible();
});
+
+ test('It should link to the topics', () => {
+
+ expect(internals.results.getByText('A single topic').closest('a'))
+ .toHaveAttribute('href', '/t/eb751e7a-5777-46c3-b81b-cc66546d5157');
+ expect(internals.results.getByText('And its companion').closest('a'))
+ .toHaveAttribute('href', '/t/b4a5613c-237b-4147-a867-9c105d51e365');
+ });
});