demarches-normaliennes/spec/controllers
Pierre de La Morinerie 75a1046315 active_storage: refactor concerns
Follow-up of #5953.

Refactor the concerns with two goals:

- Getting closer from the way ActiveStorage adds its own hooks.
  Usually ActiveStorage does this using an `Attachment#after_create`
  hook, which then delegates to the blob to enqueue the job.
- Enqueuing each job only once. By hooking on `Attachment#after_create`,
  we guarantee each job will be added only once.

We then let the jobs themselves check if they are relevant or not, and
retry or discard themselves if necessary.

We also need to update the tests a bit, because Rails'
`perform_enqueued_jobs(&block)` test helper doesn't honor the `retry_on`
clause of jobs. Instead it forwards the exception to the caller – which
makes the test fail.

Instead we use the inline version of `perform_enqueued_jobs()`, without
a block, which properly ignores errors catched by retry_on.
2021-03-16 11:49:14 +01:00
..
admin Publications page to the new UI (admin) 2020-09-16 09:15:44 +02:00
administrateur Fix manager invite administrateur 2019-08-14 16:34:50 +02:00
api [GraphQL] modifier annotation 2021-02-11 17:45:14 +01:00
champs zeitwerk: Api -> API 2021-02-09 13:07:30 +01:00
concerns specs: always require rails_helper 2020-03-31 12:48:32 +02:00
devise specs: always require rails_helper 2020-03-31 12:48:32 +02:00
france_connect disable france connect authentication for admin and instructeurs 2021-02-10 18:13:47 +01:00
instructeurs active_storage: refactor concerns 2021-03-16 11:49:14 +01:00
manager Add SerializerService 2021-03-02 12:42:22 +01:00
new_administrateur Add SerializerService 2021-03-02 12:42:22 +01:00
super_admins super_admin: check password complexity client side 2020-12-15 16:26:09 +01:00
users fix indentation 2021-03-09 14:47:23 +01:00
api_controller_spec.rb specs: always require rails_helper 2020-03-31 12:48:32 +02:00
application_controller_spec.rb Update Raven references to use Sentry 2021-01-28 19:46:36 +01:00
attachments_controller_spec.rb attachments: remove the buggy fallback 2020-04-09 10:40:08 +02:00
invites_controller_spec.rb user: revoque un invité sur un dossier 2020-07-14 18:25:31 +02:00
ping_controller_spec.rb add maintenance mode 2020-06-22 11:17:22 +02:00
root_controller_spec.rb refacto: rename administration to super_admin 2020-11-05 16:03:55 +01:00
saml_idp_controller_spec.rb act as an saml identity provider 2020-11-16 12:19:54 +01:00
stats_controller_spec.rb refacto: rename administration to super_admin 2020-11-05 16:03:55 +01:00
support_controller_spec.rb specs: always require rails_helper 2020-03-31 12:48:32 +02:00
webhook_controller_spec.rb fix tests that now requir an admin user to have a strong password 2020-09-18 11:16:34 +02:00