photoprism/pkg/http/header/duration_test.go
Michael Mayer a921f82a17 Pkg: Move /service/http/... to /http/... and add package /http/dns
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-10-19 21:08:48 +02:00

22 lines
423 B
Go

package header
import (
"testing"
"time"
"github.com/stretchr/testify/assert"
)
func TestDuration(t *testing.T) {
var (
day = time.Hour * 24
week = day * 7
month = day * 31
year = day * 365
)
assert.Equal(t, int(day.Seconds()), DurationDay)
assert.Equal(t, int(week.Seconds()), DurationWeek)
assert.Equal(t, int(month.Seconds()), DurationMonth)
assert.Equal(t, int(year.Seconds()), DurationYear)
}