test: added tests for M2M relationships, it works

This commit is contained in:
2025-01-31 22:52:28 +01:00
parent 86e29fa2dc
commit b70b4b7a81
5 changed files with 93 additions and 5 deletions

14
tests/fixtures/m2m.sql vendored Normal file
View File

@@ -0,0 +1,14 @@
INSERT INTO genres (name)
VALUES ('fantasy'),
('horror'),
('classic');
INSERT INTO book_genres (book_id, genre_id)
VALUES (1, 1),
(1, 3),
(2, 1),
(2, 3),
(3, 1),
(3, 3),
(4, 2),
(4, 3);