photoprism/internal/entity/location_test.go

16 lines
238 B
Go
Raw Normal View History

2019-12-17 17:27:08 +00:00
package entity
import (
"testing"
"github.com/stretchr/testify/assert"
2019-12-17 17:27:08 +00:00
)
func TestLocation_Label(t *testing.T) {
l := NewLocation(1, 1)
l.LocCategory = "restaurant"
result := l.Category()
2019-12-17 17:27:08 +00:00
assert.Equal(t, "restaurant", result)
}