1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-01 17:38:37 +00:00

Make configurable the number of days to archive read items

This commit is contained in:
Jebbs 2018-12-06 12:35:30 +08:00 committed by fguillot
parent 3e392dc3ae
commit 87648490fd
4 changed files with 28 additions and 9 deletions

View file

@ -708,6 +708,19 @@ func TestDisableSchedulerService(t *testing.T) {
}
}
func TestArchiveReadDays(t *testing.T) {
os.Clearenv()
os.Setenv("ARCHIVE_READ_DAYS", "7")
cfg := NewConfig()
expected := 7
result := cfg.ArchiveReadDays()
if result != expected {
t.Fatalf(`Unexpected ARCHIVE_READ_DAYS value, got %v instead of %v`, result, expected)
}
}
func TestRunMigrationsWhenUnset(t *testing.T) {
os.Clearenv()