Skip to content

Commit ef35bcc

Browse files
authored
Merge pull request #784 from YehudaGold/update-attributes-deprecated
Rails 6: fix deprecated update_attributes method usage
2 parents cfc41e9 + 4b30617 commit ef35bcc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/cases/coerced_tests.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def test_update_date_time_attributes
155155
Time.use_zone("Eastern Time (US & Canada)") do
156156
topic = Topic.find(1)
157157
time = Time.zone.parse("2017-07-17 10:56")
158-
topic.update_attributes!(written_on: time)
158+
topic.update!(written_on: time)
159159
assert_equal(time, topic.written_on)
160160
end
161161
end
@@ -166,7 +166,7 @@ def test_update_date_time_attributes_with_default_timezone_local
166166
Time.use_zone("Eastern Time (US & Canada)") do
167167
topic = Topic.find(1)
168168
time = Time.zone.parse("2017-07-17 10:56")
169-
topic.update_attributes!(written_on: time)
169+
topic.update!(written_on: time)
170170
assert_equal(time, topic.written_on)
171171
end
172172
end

0 commit comments

Comments
 (0)