diff options
author | Louise Crow <louise.crow@gmail.com> | 2015-06-23 10:01:49 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2015-06-23 10:01:49 +0100 |
commit | ac59a76cc380af792a09e5dd82b8402dc966af42 (patch) | |
tree | 8c0640c44a11ac6f9e42fdb7fc7e6618da2ed6fe /spec/lib/alaveteli_text_masker_spec.rb | |
parent | 994a13b08be94220512961b28de8fb95c8d181a5 (diff) | |
parent | 7983e37506f3fa16211255ef802bf50735adbdb8 (diff) |
Merge branch 'binary-or-utf8-attachment-bodies' into develop
Diffstat (limited to 'spec/lib/alaveteli_text_masker_spec.rb')
-rw-r--r-- | spec/lib/alaveteli_text_masker_spec.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/lib/alaveteli_text_masker_spec.rb b/spec/lib/alaveteli_text_masker_spec.rb index f2d52c1cc..f8c22a849 100644 --- a/spec/lib/alaveteli_text_masker_spec.rb +++ b/spec/lib/alaveteli_text_masker_spec.rb @@ -31,10 +31,13 @@ describe AlaveteliTextMasker do data.should == "There was a xxxxx called xxxxxxx, he wished that he was xxxx." end - it 'should handle multibyte characters correctly' do + it 'should handle multibyte characters in binary file types as binary data' do data = 'á mouse' + if String.method_defined?(:encode) + data = data.force_encoding("ASCII-8BIT") + end @regex_censor_rule.text = 'á' - apply_masks!(data, "application/octet-stream", :censor_rules => @censor_rules).should == 'x mouse' + apply_masks!(data, "application/octet-stream", :censor_rules => @censor_rules).should == 'xx mouse' end it "should apply censor rules to HTML files" do |