summaryrefslogtreecommitdiff
path: root/yarns/080-import-mail.yarn
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2015-11-07 16:49:51 +0000
committerLars Wirzenius <liw@liw.fi>2015-11-07 16:49:51 +0000
commit0c855639dd333ebe196e04b965c9c958e6a2c75e (patch)
treed8444ae1c149b22a789abfb01a33f0f31af258f8 /yarns/080-import-mail.yarn
parent9893e764ba4b0b361980726f48409c282ea65987 (diff)
downloaddistix-0c855639dd333ebe196e04b965c9c958e6a2c75e.tar.gz
Add test case for importing duplicate mails
Diffstat (limited to 'yarns/080-import-mail.yarn')
-rw-r--r--yarns/080-import-mail.yarn21
1 files changed, 21 insertions, 0 deletions
diff --git a/yarns/080-import-mail.yarn b/yarns/080-import-mail.yarn
index ece8843..7c1e24c 100644
--- a/yarns/080-import-mail.yarn
+++ b/yarns/080-import-mail.yarn
@@ -25,6 +25,27 @@ will read the e-mail from its standard input.
THEN attempt succeeded
AND output matches "^[0-9a-f]{32} bar$"
+Import one email twice. It should result in the mail existing only
+once in the ticket.
+
+ SCENARIO import one email twice
+
+ WHEN user attempts to run distix init REPO
+ THEN attempt succeeded
+
+ GIVEN file MAIL1 containing "From: foo@example.com\nSubject: bar\n\nyo\n"
+ WHEN user attempts to run distix import-mail REPO MAIL1
+ THEN attempt succeeded
+ AND everything in REPO is committed to git
+ AND repository REPO has 1 ticket
+ AND repository REPO has one copy of message in MAIL1
+
+ WHEN user attempts to run distix import-mail REPO MAIL1
+ THEN attempt succeeded
+ AND everything in REPO is committed to git
+ AND repository REPO has 1 ticket
+ AND repository REPO has one copy of message in MAIL1
+
Next, import an mbox.
SCENARIO import mbox