diff options
author | Francis Irving <francis@mysociety.org> | 2009-12-01 12:18:17 +0000 |
---|---|---|
committer | Francis Irving <francis@mysociety.org> | 2009-12-01 12:18:17 +0000 |
commit | 9a2f9beeca1cb304c51613e5bf3fdbfe1a94b1a0 (patch) | |
tree | 712f43ade93a250f103a0c932f3acaf7a5f02a2c /spec/models/raw_email_spec.rb | |
parent | cd0d1ea8d10a105393ec1e6a9eccaf09c05dfe4d (diff) |
Test for PostgreSQL slash escaping bug
http://blog.aradine.com/2009/09/rubys-marshal-and-activerecord-and.html
https://rails.lighthouseapp.com/projects/8994/tickets/1063-binary-data-broken-with-postgresql-adapter
Diffstat (limited to 'spec/models/raw_email_spec.rb')
-rw-r--r-- | spec/models/raw_email_spec.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/models/raw_email_spec.rb b/spec/models/raw_email_spec.rb new file mode 100644 index 000000000..65780baed --- /dev/null +++ b/spec/models/raw_email_spec.rb @@ -0,0 +1,25 @@ +require File.dirname(__FILE__) + '/../spec_helper' + +describe User, "manipulating a raw email" do + before do + @raw_email = RawEmail.new + end + + it 'putting data in comes back out' do + @raw_email.data = "Hello, world!" + @raw_email.save! + @raw_email.reload + @raw_email.data.should == "Hello, world!" + end + + it 'putting data in comes back out even if it has a backslash in it' do + @raw_email.data = "This \\ that" + @raw_email.save! + @raw_email.reload + STDERR.puts @raw_email.data + STDERR.puts "This \\ that" + @raw_email.data.should == "This \\ that" + end + +end + |