aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2013-09-18 16:14:41 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2013-09-18 16:14:41 -0700
commit460eb83de0579c36d96410e48a1385987ad0020c (patch)
tree52af2cde86263874973366529af6d9e3e4979607 /activerecord/test
parent6256734e2d0bdd89f4b5d11da259d40afa0c95c7 (diff)
downloadrails-460eb83de0579c36d96410e48a1385987ad0020c.tar.gz
rails-460eb83de0579c36d96410e48a1385987ad0020c.tar.bz2
rails-460eb83de0579c36d96410e48a1385987ad0020c.zip
support objects with blank string primary keys
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/base_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb
index 87597db7b0..9877e6812d 100644
--- a/activerecord/test/cases/base_test.rb
+++ b/activerecord/test/cases/base_test.rb
@@ -566,6 +566,12 @@ class BasicsTest < ActiveRecord::TestCase
assert_equal topic, Topic.find(topic.id)
end
+ def test_blank_ids
+ one = Subscriber.new(:id => '')
+ two = Subscriber.new(:id => '')
+ assert_equal one, two
+ end
+
def test_comparison_with_different_objects
topic = Topic.create
category = Category.create(:name => "comparison")