DEV: Fix RSpec service matchers when a model is not found

This is a follow-up of d749227e87.

This patch checks if the key `not_found` is present on the result object
instead of calling `#blank?` on the model, as it can trigger an
`ActiveRecord` relation.
This commit is contained in:
Loïc Guitaut 2024-08-27 14:49:07 +02:00 committed by Loïc Guitaut
parent 92f03a1108
commit 31c0a08f8a
1 changed files with 1 additions and 1 deletions

View File

@ -99,7 +99,7 @@ module ServiceMatchers
end
def step_failed?
super && result[name].blank?
super && result[step].not_found
end
end