diff options
| author | Douwe Maan <douwe@gitlab.com> | 2015-08-21 16:09:55 -0700 |
|---|---|---|
| committer | Douwe Maan <douwe@gitlab.com> | 2015-08-21 16:09:55 -0700 |
| commit | 15fc7bd6139f0b429c05c055b4cfab561c926e08 (patch) | |
| tree | 5ae7287c076fe74fbab3140b22dcacdd2f96c460 /spec/lib | |
| parent | 3abb356dd215235765f89c78c98655dc62688b77 (diff) | |
| download | gitlab-ce-15fc7bd6139f0b429c05c055b4cfab561c926e08.tar.gz | |
No HTML-only email please
Diffstat (limited to 'spec/lib')
| -rw-r--r-- | spec/lib/gitlab/email/reply_parser_spec.rb | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/spec/lib/gitlab/email/reply_parser_spec.rb b/spec/lib/gitlab/email/reply_parser_spec.rb index a94c92ad53c..7cae1da8050 100644 --- a/spec/lib/gitlab/email/reply_parser_spec.rb +++ b/spec/lib/gitlab/email/reply_parser_spec.rb @@ -19,9 +19,22 @@ describe Gitlab::Email::ReplyParser do expect(test_parse_body(fixture_file("emails/no_content_reply.eml"))).to eq("") end - it "can parse the html section" do - expect(test_parse_body(fixture_file("emails/html_only.eml"))).to eq("The EC2 instance - I've seen that there tends to be odd and " + - "unrecommended settings on the Bitnami installs that I've checked out.") + it "properly renders plaintext-only email" do + expect(test_parse_body(fixture_file("emails/plaintext_only.eml"))). + to eq( + <<-BODY.strip_heredoc.chomp + ### reply from default mail client in Windows 8.1 Metro + + + The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. + + + This is a **bold** word in Markdown + + + This is a link http://example.com + BODY + ) end it "supports a Dutch reply" do |
