2019-12-17 18:25:39 +01:00
|
|
|
package entity
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
2019-12-21 17:24:29 +01:00
|
|
|
|
|
|
|
"github.com/stretchr/testify/assert"
|
2019-12-17 18:25:39 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
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)
|
|
|
|
}
|