aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/associations/has_many_associations_test.rb2
-rw-r--r--activerecord/test/cases/autosave_association_test.rb8
2 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/test/cases/associations/has_many_associations_test.rb b/activerecord/test/cases/associations/has_many_associations_test.rb
index 8fd9de07c9..a75d064ac0 100644
--- a/activerecord/test/cases/associations/has_many_associations_test.rb
+++ b/activerecord/test/cases/associations/has_many_associations_test.rb
@@ -1496,7 +1496,7 @@ class HasManyAssociationsTest < ActiveRecord::TestCase
david = people(:david)
assert_equal ["A Modest Proposal"], david.essays.map(&:name)
- david.essays = [Essay.create!(name: "Remote Work" )]
+ david.essays = [Essay.create!(:name => "Remote Work" )]
assert_equal ["Remote Work"], david.essays.map(&:name)
end
diff --git a/activerecord/test/cases/autosave_association_test.rb b/activerecord/test/cases/autosave_association_test.rb
index bb07cf4185..f7697fa77b 100644
--- a/activerecord/test/cases/autosave_association_test.rb
+++ b/activerecord/test/cases/autosave_association_test.rb
@@ -781,17 +781,17 @@ class TestDestroyAsPartOfAutosaveAssociation < ActiveRecord::TestCase
end
def test_should_save_new_record_that_has_same_value_as_existing_record_marked_for_destruction_on_field_that_has_unique_index
- Bird.connection.add_index :birds, :name, unique: true
+ Bird.connection.add_index :birds, :name, :unique => true
- 3.times { |i| @pirate.birds.create(name: "unique_birds_#{i}") }
+ 3.times { |i| @pirate.birds.create(:name => "unique_birds_#{i}") }
@pirate.birds[0].mark_for_destruction
- @pirate.birds.build(name: @pirate.birds[0].name)
+ @pirate.birds.build(:name => @pirate.birds[0].name)
@pirate.save!
assert_equal 3, @pirate.birds.reload.length
ensure
- Bird.connection.remove_index :birds, column: :name
+ Bird.connection.remove_index :birds, :column => :name
end
# Add and remove callbacks tests for association collections.