/
githubmirror
/
photoprism
Обзор
Документация
Войти
/
githubmirror
/
photoprism
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
pkg/http/header/duration_test.go
22 строки
423 B
Michael Mayer
Pkg: Move /service/http/... to /http/... and add package /http/dns
19 окт 2025, 22:08
19 окт 2025, 22:08
a921f82
Код
Авторство
О чём код?
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) }