]> cat aescling's git repositories - mastodon.git/commitdiff
fix #17601 change `:keys` to `:attribute_names` (#17637)
authorSumak <44816995+Kawsay@users.noreply.github.com>
Thu, 24 Feb 2022 13:46:21 +0000 (14:46 +0100)
committerGitHub <noreply@github.com>
Thu, 24 Feb 2022 13:46:21 +0000 (14:46 +0100)
spec/support/matchers/model/model_have_error_on_field.rb

index a5dfbf4570ffdba9817812f19e54d1421fc6289f..85bdd82159d3212dad7b4f749b384e5b06827e1e 100644 (file)
@@ -8,7 +8,7 @@ RSpec::Matchers.define :model_have_error_on_field do |expected|
   end
 
   failure_message do |record|
-    keys = record.errors.keys
+    keys = record.errors.attribute_names
 
     "expect record.errors(#{keys}) to include #{expected}"
   end