From 7cf2dc709482a6e387430dabcade181ac039f6c7 Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Thu, 25 Jun 2015 10:02:17 +0100 Subject: Handle non-UTF8 encoding in ruby 1.9 and above --- spec/script/handle-mail-replies_spec.rb | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'spec/script/handle-mail-replies_spec.rb') diff --git a/spec/script/handle-mail-replies_spec.rb b/spec/script/handle-mail-replies_spec.rb index 62d5c1dab..72914e517 100644 --- a/spec/script/handle-mail-replies_spec.rb +++ b/spec/script/handle-mail-replies_spec.rb @@ -12,11 +12,22 @@ def mail_reply_test(email_filename) end describe "When filtering" do - it "should not fail when not in test mode" do - xc = ExternalCommand.new("script/handle-mail-replies", - { :stdin_string => load_file_fixture("track-response-exim-bounce.email") }) - xc.run - xc.err.should == "" + + describe "when not in test mode" do + + it "should not fail handling a bounce mail" do + xc = ExternalCommand.new("script/handle-mail-replies", + { :stdin_string => load_file_fixture("track-response-exim-bounce.email") }) + xc.run + xc.err.should == "" + end + + it 'should not fail handling a UTF8 encoded mail' do + xc = ExternalCommand.new("script/handle-mail-replies", + { :stdin_string => load_file_fixture("russian.email") }) + xc.run + xc.err.should == "" + end end it "should detect an Exim bounce" do -- cgit v1.2.3