]> git.r.bdr.sh - rbdr/forum/blobdiff - src/components/tag/tag.test.js
Add test for forum topic list
[rbdr/forum] / src / components / tag / tag.test.js
index 3f19598b4a3eb0a92fb27285f656e04f8c08ffa7..a2b6e0dcfddb7ce183538f7e5caee8079a9af50e 100644 (file)
@@ -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');
+  });
 });