mirror of
https://github.com/photoprism/photoprism.git
synced 2025-10-05 16:57:17 +08:00
16 lines
353 B
Go
16 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)
|
|
}
|