demarches-normaliennes/spec
Pierre de La Morinerie 9f1407b6d7 expiration: fix the mailer arguments
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).
2020-05-18 16:24:08 +02:00
..
controllers app: fix JS redirection with Turbolinks disabled 2020-05-13 11:04:16 +02:00
factories Remove legacy carto code 2020-05-13 12:17:04 +02:00
features app: remove the feature flag for pieces justificatives auto-upload 2020-05-14 17:39:07 +02:00
fixtures create bilans_bdf_adapter 2020-04-30 16:15:16 +02:00
helpers tests for dossier_helper#demandeur_dossier 2020-04-10 13:14:39 +02:00
jobs specs: always require rails_helper 2020-03-31 12:48:32 +02:00
lib fix spec with not expired token 2020-05-06 10:57:45 +02:00
mailers precision dans mail suppression dossier en construction 2020-04-28 12:42:00 +00:00
middlewares specs: always require rails_helper 2020-03-31 12:48:32 +02:00
models Anonymisation de l'instructeur dans la messagerie 2020-05-18 12:56:30 +00:00
policies policies: fix champ policy for guest users 2020-04-02 11:27:14 +02:00
serializers Remove legacy carto code 2020-05-13 12:17:04 +02:00
services expiration: fix the mailer arguments 2020-05-18 16:24:08 +02:00
support specs: remove unused wait-for-ajax helper 2020-03-31 12:54:49 +02:00
views Anonymisation de l'instructeur dans la messagerie 2020-05-18 12:56:30 +00:00
rails_helper.rb specs: always require rails_helper 2020-03-31 12:48:32 +02:00
spec_helper.rb rspec: allow Rails to auto-migrate the test schema 2020-03-31 12:48:32 +02:00