9f1407b6d7
The mailers expect serializable arguments, but were given ActiveRecord::Relation objects instead. This made the mailers throw an exception. But how was that possible ? This code is tested, and the tests were green. Well, the specs spy on the mailer implementation, in order to check that the mailers methods were properly called. Fair enough. But if the specs mock the mailer code (instead of calling the original implementation), we may not notice that the original implementation rejects our method parameters. Here this is the case: once we actually call the original implementation the tests start to fail, because some arguments are not converted from an ActiveRecord::Relation to a serializable array. This is fixed by ensuring that the mailer code is executed (and doesn't throw an exception). |
||
---|---|---|
.. | ||
administrateur_usage_statistics_service.rb | ||
api_carto_service.rb | ||
api_entreprise_service.rb | ||
bill_signature_service.rb | ||
browser_support.rb | ||
clamav_service.rb | ||
commentaire_service.rb | ||
dossier_search_service.rb | ||
expired_dossiers_deletion_service.rb | ||
france_connect_service.rb | ||
geojson_service.rb | ||
ip_service.rb | ||
notification_service.rb | ||
pieces_justificatives_service.rb | ||
pipedrive_service.rb | ||
procedure_export_service.rb | ||
render_partial_service.rb | ||
staging_auth_service.rb | ||
zxcvbn_service.rb |