photoprism/internal/entity/category_test.go
Michael Mayer 8e15c1d6fd Code clean-up (make fmt)
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2019-12-21 17:24:29 +01:00

15 lines
353 B
Go

package entity
import (
"testing"
"github.com/stretchr/testify/assert"
)
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)
}