diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-12-31 22:16:07 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2018-01-01 05:26:35 +0900 |
commit | e4c6a84fb15c7856b66d8fb478d396d68ba50c34 (patch) | |
tree | eb77df908e26a3911c8fb0d4ca38dfbe3100556e /activerecord/test/cases/reflection_test.rb | |
parent | b5580e439a24b64eba5aede0965f2c4f57463792 (diff) | |
download | rails-e4c6a84fb15c7856b66d8fb478d396d68ba50c34.tar.gz rails-e4c6a84fb15c7856b66d8fb478d396d68ba50c34.tar.bz2 rails-e4c6a84fb15c7856b66d8fb478d396d68ba50c34.zip |
Remove `association_primary_key_type` from `AssociationReflection` and `ThroughReflection`
This method was introduced in #26718, which is internally used only in
`CollectionAssociation`. There is no need to be in the reflection
classes.
Diffstat (limited to 'activerecord/test/cases/reflection_test.rb')
-rw-r--r-- | activerecord/test/cases/reflection_test.rb | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/activerecord/test/cases/reflection_test.rb b/activerecord/test/cases/reflection_test.rb index 37c2235f1a..44055e5ab6 100644 --- a/activerecord/test/cases/reflection_test.rb +++ b/activerecord/test/cases/reflection_test.rb @@ -310,15 +310,6 @@ class ReflectionTest < ActiveRecord::TestCase assert_equal "custom_primary_key", Author.reflect_on_association(:tags_with_primary_key).association_primary_key.to_s # nested end - def test_association_primary_key_type - # Normal Association - assert_equal :integer, Author.reflect_on_association(:posts).association_primary_key_type.type - assert_equal :string, Author.reflect_on_association(:essay).association_primary_key_type.type - - # Through Association - assert_equal :string, Author.reflect_on_association(:essay_category).association_primary_key_type.type - end - def test_association_primary_key_raises_when_missing_primary_key reflection = ActiveRecord::Reflection.create(:has_many, :edge, nil, {}, Author) assert_raises(ActiveRecord::UnknownPrimaryKey) { reflection.association_primary_key } |