diff --git a/internal/entity/category_test.go b/internal/entity/category_test.go new file mode 100644 index 000000000..97745ad77 --- /dev/null +++ b/internal/entity/category_test.go @@ -0,0 +1,14 @@ +package entity + +import ( + "github.com/stretchr/testify/assert" + "testing" +) + +func TestCategory_TableName(t *testing.T) { + label := &Label{LabelSlug: "cute-kitten", LabelName: " Cute Kitten"} + category := &Category{LabelID: 1, CategoryID: 1, Label: label, Category: label} + tableName := category.TableName() + + assert.Equal(t, "categories", tableName) +}