Add test for entity/category.go
This commit is contained in:
parent
1b78ae2513
commit
2d12e6aa72
14
internal/entity/category_test.go
Normal file
14
internal/entity/category_test.go
Normal file
@ -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)
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user