diff options
author | Antonio Terceiro <terceiro@softwarelivre.org> | 2014-10-07 18:31:18 -0300 |
---|---|---|
committer | Antonio Terceiro <terceiro@softwarelivre.org> | 2014-10-07 18:31:18 -0300 |
commit | 21e8e7caa9b420cd7c1b2a96303200ce3686281d (patch) | |
tree | 1338102c01bd0ce79a8bdc3bba15187be9bc97dd /test/tc_maildir.rb | |
parent | 706a52ea12976ab2b7892e21a97fff99fb6731b3 (diff) | |
download | feed2imap-21e8e7caa9b420cd7c1b2a96303200ce3686281d.tar.gz feed2imap-21e8e7caa9b420cd7c1b2a96303200ce3686281d.tar.bz2 feed2imap-21e8e7caa9b420cd7c1b2a96303200ce3686281d.zip |
Fix cleanup of maildirs
Thanks to Sylvain L. Sauvage for the bug report
Diffstat (limited to 'test/tc_maildir.rb')
-rw-r--r-- | test/tc_maildir.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/tc_maildir.rb b/test/tc_maildir.rb index cf9f8e3..7df47b8 100644 --- a/test/tc_maildir.rb +++ b/test/tc_maildir.rb @@ -21,6 +21,10 @@ class TestMaildir < Test::Unit::TestCase folder = create_maildir msgs = message_count(folder) + four_days_ago = Time.now - (4 * 24 * 60 * 60) + old_message = Dir.glob(File.join(folder, '**/*:2,S')).first + FileUtils.touch old_message, mtime: four_days_ago + maildir_account.cleanup(folder) assert_equal msgs - 1, message_count(folder) |