aboutsummaryrefslogtreecommitdiff
path: root/src/models/boil_relationship_test.go
diff options
context:
space:
mode:
authorAlexander Kavon <me+git@alexkavon.com>2024-01-23 01:40:39 -0500
committerAlexander Kavon <me+git@alexkavon.com>2024-01-23 01:40:39 -0500
commit8510c36ded85740885e67b59ee2ec2360986c0a9 (patch)
treec8c4c70458bb65b0ee134f80cb364db851e9c7a2 /src/models/boil_relationship_test.go
parentf329e7f2095a57967bfe86563401236d53a15924 (diff)
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
Diffstat (limited to 'src/models/boil_relationship_test.go')
-rw-r--r--src/models/boil_relationship_test.go34
1 files changed, 28 insertions, 6 deletions
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)
+}