summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/email/handler
diff options
context:
space:
mode:
authorCameron Crockett <cameron@ccrockett.com>2018-05-09 15:19:16 -0500
committerCameron Crockett <cameron@ccrockett.com>2018-05-22 23:05:51 -0500
commit421dbb1746e7944a578d2dc894ae3975dac94ac8 (patch)
treeb7dc90958be9f94ffe0f57bb56b5a590f21c02d1 /spec/lib/gitlab/email/handler
parent76e276cb433a7023cf8154f9d9555725b3b11e67 (diff)
downloadgitlab-ce-421dbb1746e7944a578d2dc894ae3975dac94ac8.tar.gz
skip email trim when email is creating new issue
Updates from MR discussion 1. Added test for ReplyParser 2. Changed param to trim_reply with default set as true Removed keyword param in favor of normal options param updates for MR discussion Resolutions for code review comments more code review fixes
Diffstat (limited to 'spec/lib/gitlab/email/handler')
-rw-r--r--spec/lib/gitlab/email/handler/create_issue_handler_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/lib/gitlab/email/handler/create_issue_handler_spec.rb b/spec/lib/gitlab/email/handler/create_issue_handler_spec.rb
index 452249210b0..154ab4b3856 100644
--- a/spec/lib/gitlab/email/handler/create_issue_handler_spec.rb
+++ b/spec/lib/gitlab/email/handler/create_issue_handler_spec.rb
@@ -46,6 +46,20 @@ describe Gitlab::Email::Handler::CreateIssueHandler do
expect(issue.description).to eq('')
end
end
+
+ context "when there are quotes in email" do
+ let(:email_raw) { fixture_file("emails/valid_new_issue_with_quote.eml") }
+
+ it "creates a new issue" do
+ expect { receiver.execute }.to change { project.issues.count }.by(1)
+ issue = project.issues.last
+
+ expect(issue.author).to eq(user)
+ expect(issue.title).to eq('New Issue by email')
+ expect(issue.description).to include('reply by email')
+ expect(issue.description).to include('> this is a quote')
+ end
+ end
end
context "something is wrong" do