Use hash style syntax to get errors

ActiveModel::Errors#get is deprecated, has no effect, and will be
removed without replacement.

Co-Authored-By: Dan Rice <dnrce@users.noreply.github.com>
This commit is contained in:
Matt Rogers 2018-11-03 15:23:56 -05:00
parent 6e48ce6594
commit 735c6848fc
No known key found for this signature in database
GPG key ID: 605D017C07EB4316

View file

@ -117,7 +117,7 @@ class RecurringTodosControllerTest < ActionController::TestCase
# check error message
errors = assigns(:recurring_todo).errors
assert_equal 1, errors.size
assert_equal errors.get(:description), ["can't be blank"]
assert_equal errors[:description], ["can't be blank"]
end
def test_new_recurring_todo_handles_attribs_outside_rec_todo