From 4e6be9f49b9697d9577014b3ee2b7988129823a9 Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Thu, 22 Apr 2021 00:58:09 +0200 Subject: Add test for forum topic list Also adds URL test for tag topic list --- src/components/tag/tag.test.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/components/tag') 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'); + }); }); -- cgit