aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/associations/has_one_associations_test.rb9
-rw-r--r--activerecord/test/cases/associations/join_model_test.rb12
-rw-r--r--activerecord/test/cases/reflection_test.rb6
-rw-r--r--activerecord/test/cases/validations/i18n_validation_test.rb19
4 files changed, 0 insertions, 46 deletions
diff --git a/activerecord/test/cases/associations/has_one_associations_test.rb b/activerecord/test/cases/associations/has_one_associations_test.rb
index d5dbb88886..7372f2da1b 100644
--- a/activerecord/test/cases/associations/has_one_associations_test.rb
+++ b/activerecord/test/cases/associations/has_one_associations_test.rb
@@ -186,15 +186,6 @@ class HasOneAssociationsTest < ActiveRecord::TestCase
assert_equal account, firm.account
end
- def test_failing_build_association
- firm = Firm.new("name" => "GlobalMegaCorp")
- firm.save
-
- account = firm.build_account
- assert !account.save
- assert_equal ["can't be empty"], account.errors["credit_limit"]
- end
-
def test_build_association_twice_without_saving_affects_nothing
count_of_account = Account.count
firm = Firm.find(:first)
diff --git a/activerecord/test/cases/associations/join_model_test.rb b/activerecord/test/cases/associations/join_model_test.rb
index e9af5a60d8..8bdf8bcd55 100644
--- a/activerecord/test/cases/associations/join_model_test.rb
+++ b/activerecord/test/cases/associations/join_model_test.rb
@@ -52,18 +52,6 @@ class AssociationsJoinModelTest < ActiveRecord::TestCase
assert_equal 1, authors(:mary).unique_categorized_posts.find_all_by_title("So I was thinking").size
end
- def test_polymorphic_has_many
- assert posts(:welcome).taggings.include?(taggings(:welcome_general))
- end
-
- def test_polymorphic_has_one
- assert_equal taggings(:welcome_general), posts(:welcome).tagging
- end
-
- def test_polymorphic_belongs_to
- assert_equal posts(:welcome), posts(:welcome).taggings.first.taggable
- end
-
def test_polymorphic_has_many_going_through_join_model
assert_equal tags(:general), tag = posts(:welcome).tags.first
assert_no_queries do
diff --git a/activerecord/test/cases/reflection_test.rb b/activerecord/test/cases/reflection_test.rb
index 2c9158aa7b..67818622d7 100644
--- a/activerecord/test/cases/reflection_test.rb
+++ b/activerecord/test/cases/reflection_test.rb
@@ -22,12 +22,6 @@ class ReflectionTest < ActiveRecord::TestCase
assert_equal "Subscriber", Subscriber.model_name.human
end
- def test_column_null_not_null
- subscriber = Subscriber.find(:first)
- assert subscriber.column_for_attribute("name").null
- assert !subscriber.column_for_attribute("nick").null
- end
-
def test_read_attribute_names
assert_equal(
%w( id title author_name author_email_address bonus_time written_on last_read content approved replies_count parent_id parent_title type ).sort,
diff --git a/activerecord/test/cases/validations/i18n_validation_test.rb b/activerecord/test/cases/validations/i18n_validation_test.rb
index a0ff35f948..38fa2b821d 100644
--- a/activerecord/test/cases/validations/i18n_validation_test.rb
+++ b/activerecord/test/cases/validations/i18n_validation_test.rb
@@ -47,25 +47,6 @@ class I18nValidationTest < ActiveRecord::TestCase
@topic.valid?
end
- # validates_uniqueness_of w/o mocha
-
- def test_validates_associated_finds_custom_model_key_translation
- I18n.backend.store_translations 'en', :activerecord => {:errors => {:models => {:topic => {:attributes => {:title => {:taken => 'custom message'}}}}}}
- I18n.backend.store_translations 'en', :activerecord => {:errors => {:messages => {:taken => 'global message'}}}
-
- Topic.validates_uniqueness_of :title
- unique_topic.valid?
- assert_equal ['custom message'], unique_topic.errors[:replies]
- end
-
- def test_validates_associated_finds_global_default_translation
- I18n.backend.store_translations 'en', :activerecord => {:errors => {:messages => {:taken => 'global message'}}}
-
- Topic.validates_uniqueness_of :title
- unique_topic.valid?
- assert_equal ['global message'], unique_topic.errors[:replies]
- end
-
# validates_associated w/ mocha
def test_validates_associated_generates_message