aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorSean Griffin <sean@seantheprogrammer.com>2014-12-30 13:33:42 -0700
committerSean Griffin <sean@seantheprogrammer.com>2014-12-30 13:33:42 -0700
commit322750e213ee929752a8bb07dbe44b839452e0a3 (patch)
tree4a51ccd0592e13634e622909889531379a6b99ed /activerecord/test
parent45280686edd158a54012a86c23cc7ee424cda2c6 (diff)
parent969ef21d327ec3ada9c5c4b06c1ed92afa55dbec (diff)
downloadrails-322750e213ee929752a8bb07dbe44b839452e0a3.tar.gz
rails-322750e213ee929752a8bb07dbe44b839452e0a3.tar.bz2
rails-322750e213ee929752a8bb07dbe44b839452e0a3.zip
Merge pull request #17680 from larskanis/fix_bytea_change_detection
PostgreSQL, Fix change detection caused by superfluous bytea unescaping
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/dirty_test.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/activerecord/test/cases/dirty_test.rb b/activerecord/test/cases/dirty_test.rb
index 1eaff5e293..98cf60a8c4 100644
--- a/activerecord/test/cases/dirty_test.rb
+++ b/activerecord/test/cases/dirty_test.rb
@@ -688,7 +688,14 @@ class DirtyTest < ActiveRecord::TestCase
serialize :data
end
- klass.create!(data: "foo")
+ binary = klass.create!(data: "\\\\foo")
+
+ assert_not binary.changed?
+
+ binary.data = binary.data.dup
+
+ assert_not binary.changed?
+
binary = klass.last
assert_not binary.changed?