summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test/maildir/cur/1376317520.15789_1.debian:2,S11
-rw-r--r--test/tc_maildir.rb4
2 files changed, 15 insertions, 0 deletions
diff --git a/test/maildir/cur/1376317520.15789_1.debian:2,S b/test/maildir/cur/1376317520.15789_1.debian:2,S
new file mode 100644
index 0000000..09df924
--- /dev/null
+++ b/test/maildir/cur/1376317520.15789_1.debian:2,S
@@ -0,0 +1,11 @@
+Date: Mon, 12 Aug 2013 16:25:20 +0200
+From: Antonio Terceiro <terceiro@debian.org>
+To: terceiro@debian.org
+Subject: UTF-8 data: =?iso-8859-1?B?4ent8/o=?=
+Message-ID: <regular-message-id-2@debian.org>
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Content-Disposition: inline
+User-Agent: Mutt/1.5.21 (2010-09-15)
+
+This is a sample email
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)