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:
parent
3e392dc3ae
commit
87648490fd
4 changed files with 28 additions and 9 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue