From 8510c36ded85740885e67b59ee2ec2360986c0a9 Mon Sep 17 00:00:00 2001 From: Alexander Kavon Date: Tue, 23 Jan 2024 01:40:39 -0500 Subject: new tables: tags, post_tags, generated sqlboiler tags model, updated posts/get template, updated posts table to take nullable description and user_id foreign key --- src/models/boil_relationship_test.go | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) (limited to 'src/models/boil_relationship_test.go') diff --git a/src/models/boil_relationship_test.go b/src/models/boil_relationship_test.go index c4d831d..191d17c 100644 --- a/src/models/boil_relationship_test.go +++ b/src/models/boil_relationship_test.go @@ -7,7 +7,10 @@ import "testing" // TestToOne tests cannot be run in parallel // or deadlocks can occur. -func TestToOne(t *testing.T) {} +func TestToOne(t *testing.T) { + t.Run("PostToUserUsingUser", testPostToOneUserUsingUser) + t.Run("TagToUserUsingUser", testTagToOneUserUsingUser) +} // TestOneToOne tests cannot be run in parallel // or deadlocks can occur. @@ -15,11 +18,19 @@ func TestOneToOne(t *testing.T) {} // TestToMany tests cannot be run in parallel // or deadlocks can occur. -func TestToMany(t *testing.T) {} +func TestToMany(t *testing.T) { + t.Run("PostToTags", testPostToManyTags) + t.Run("TagToPosts", testTagToManyPosts) + t.Run("UserToPosts", testUserToManyPosts) + t.Run("UserToTags", testUserToManyTags) +} // TestToOneSet tests cannot be run in parallel // or deadlocks can occur. -func TestToOneSet(t *testing.T) {} +func TestToOneSet(t *testing.T) { + t.Run("PostToUserUsingPosts", testPostToOneSetOpUserUsingUser) + t.Run("TagToUserUsingTags", testTagToOneSetOpUserUsingUser) +} // TestToOneRemove tests cannot be run in parallel // or deadlocks can occur. @@ -35,12 +46,23 @@ func TestOneToOneRemove(t *testing.T) {} // TestToManyAdd tests cannot be run in parallel // or deadlocks can occur. -func TestToManyAdd(t *testing.T) {} +func TestToManyAdd(t *testing.T) { + t.Run("PostToTags", testPostToManyAddOpTags) + t.Run("TagToPosts", testTagToManyAddOpPosts) + t.Run("UserToPosts", testUserToManyAddOpPosts) + t.Run("UserToTags", testUserToManyAddOpTags) +} // TestToManySet tests cannot be run in parallel // or deadlocks can occur. -func TestToManySet(t *testing.T) {} +func TestToManySet(t *testing.T) { + t.Run("PostToTags", testPostToManySetOpTags) + t.Run("TagToPosts", testTagToManySetOpPosts) +} // TestToManyRemove tests cannot be run in parallel // or deadlocks can occur. -func TestToManyRemove(t *testing.T) {} +func TestToManyRemove(t *testing.T) { + t.Run("PostToTags", testPostToManyRemoveOpTags) + t.Run("TagToPosts", testTagToManyRemoveOpPosts) +} -- cgit v1.2.3