aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations/has_one_associations_test.rb
diff options
context:
space:
mode:
authorNeeraj Singh <neerajdotname@gmail.com>2013-07-03 00:46:39 +0530
committerNeeraj Singh <neerajdotname@gmail.com>2013-07-03 00:56:20 +0530
commit0e3700364c98fe8f766fea8d711795dfe15e7ff0 (patch)
treeeaf4a6080e62dbec12a4cfce0e5b102c74b1ad4f /activerecord/test/cases/associations/has_one_associations_test.rb
parenta95cbabc358a6f221b288f93fd8d48d769f6d23b (diff)
downloadrails-0e3700364c98fe8f766fea8d711795dfe15e7ff0.tar.gz
rails-0e3700364c98fe8f766fea8d711795dfe15e7ff0.tar.bz2
rails-0e3700364c98fe8f766fea8d711795dfe15e7ff0.zip
Dropped deprecated option `:restrict` for `:dependent` in associations
Diffstat (limited to 'activerecord/test/cases/associations/has_one_associations_test.rb')
-rw-r--r--activerecord/test/cases/associations/has_one_associations_test.rb16
1 files changed, 0 insertions, 16 deletions
diff --git a/activerecord/test/cases/associations/has_one_associations_test.rb b/activerecord/test/cases/associations/has_one_associations_test.rb
index 0e48fbca9c..4fdf9a9643 100644
--- a/activerecord/test/cases/associations/has_one_associations_test.rb
+++ b/activerecord/test/cases/associations/has_one_associations_test.rb
@@ -158,22 +158,6 @@ class HasOneAssociationsTest < ActiveRecord::TestCase
assert_nothing_raised { firm.destroy }
end
- def test_restrict
- firm = RestrictedFirm.create!(:name => 'restrict')
- firm.create_account(:credit_limit => 10)
-
- assert_not_nil firm.account
-
- assert_raise(ActiveRecord::DeleteRestrictionError) { firm.destroy }
- assert RestrictedFirm.exists?(:name => 'restrict')
- assert firm.account.present?
- end
-
- def test_restrict_is_deprecated
- klass = Class.new(ActiveRecord::Base)
- assert_deprecated { klass.has_one :post, dependent: :restrict }
- end
-
def test_restrict_with_exception
firm = RestrictedWithExceptionFirm.create!(:name => 'restrict')
firm.create_account(:credit_limit => 10)