aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models/incoming_message_spec.rb
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2011-08-12 16:06:28 +0100
committerSeb Bacon <seb.bacon@gmail.com>2011-08-12 16:11:20 +0100
commitdbac4121cae0d620c7c11c6731fe5344ff1c677e (patch)
treeca893bc09c9e09e93e1ed400495ba9c73333419a /spec/models/incoming_message_spec.rb
parent7705f6754184d471fb5da38c5d8671a7737bcdd6 (diff)
Force elinks to assume UTF8 character set for its input (used when making plain text versions of HTML email)
Diffstat (limited to 'spec/models/incoming_message_spec.rb')
-rw-r--r--spec/models/incoming_message_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/models/incoming_message_spec.rb b/spec/models/incoming_message_spec.rb
index ad7aa8d43..183a258af 100644
--- a/spec/models/incoming_message_spec.rb
+++ b/spec/models/incoming_message_spec.rb
@@ -19,6 +19,13 @@ describe IncomingMessage, " when dealing with incoming mail" do
end
+describe IncomingMessage, "when parsing HTML mail" do
+ it "should display UTF-8 characters in the plain text version correctly" do
+ html = "<html><b>foo</b> është"
+ plain_text = IncomingMessage._get_attachment_text_internal_one_file('text/html', html)
+ plain_text.should match(/është/)
+ end
+end
describe IncomingMessage, "when getting the attachment text" do