demarches-normaliennes/spec/models
Pierre de La Morinerie 71e1b6c973 models: delete AdministrateursProcedure when destroying Administrateur
By default, `has_and_belongs_to_many` properly deletes the record in
the join table.

However, as the association is declared manually with a
`has_many / through`, it doesn't delete the joined record automatically.

As we also lack a foreign-key contraint on the join table, that means
a dangling record remains in the join table.

To fix this, let's declare it a proper `has_and_belongs_to_many`
association, which will let the join record be deleted automatically
on destroy.
2022-03-01 16:58:04 +01:00
..
champs feat(api particulier): add MESRI field 2021-12-16 16:45:18 +01:00
concern fix(dossier): use depose_at instead of en_construction_at 2021-12-06 15:49:17 +01:00
types_de_champ add code insee libelle for commune export 2021-08-19 08:04:47 +02:00
administrateur_spec.rb models: delete AdministrateursProcedure when destroying Administrateur 2022-03-01 16:58:04 +01:00
api_entreprise_token_spec.rb refactor(API Entreprise): raise an error on blank token 2022-02-07 15:18:16 +01:00
archive_spec.rb Revert "Revert "Export de tous les dossier d'une démarche"" 2021-04-29 17:29:47 +02:00
assign_to_spec.rb models: require belong_to associations on assign_to 2020-08-18 15:57:36 +02:00
attestation_template_spec.rb refactor(attestation_template): cleanup relationships 2022-02-11 08:45:32 +01:00
avis_spec.rb experts_procedure should not be optional 2021-03-23 13:46:33 +01:00
bill_signature_spec.rb spec: use real signature to avoid mocking 2020-12-14 14:09:15 +01:00
champ_private_spec.rb specs: always require rails_helper 2020-03-31 12:48:32 +02:00
champ_shared_example.rb Improuve champ blank check 2021-07-22 10:45:25 +02:00
champ_spec.rb format phone numbers 2021-06-15 09:14:55 +02:00
commentaire_spec.rb refactor(mail.delay): use simplier implementation using after_action to prevent email delivery with delay 2021-11-16 15:12:05 +01:00
deleted_dossier_spec.rb specs: remove unused require 2021-03-25 13:24:53 +01:00
dossier_spec.rb feat(dossier): rebase dossiers en construction and en instruction 2022-02-18 17:08:38 +01:00
dossier_transfer_spec.rb fix(transfer): manually nullify staled transfers references 2021-10-21 13:54:26 +02:00
etablissement_spec.rb export bilans in ods and xlsx 2020-06-04 15:31:16 +02:00
exercice_spec.rb specs: always require rails_helper 2020-03-31 12:48:32 +02:00
expert_spec.rb add case when the old_expert or old_instructeur is nil 2021-10-12 11:04:06 +02:00
experts_procedure_spec.rb experts_procedure should not be optional 2021-03-23 13:46:33 +01:00
export_spec.rb Add last_month export 2021-06-23 09:23:10 +02:00
france_connect_information_spec.rb associate_user take a target email 2021-10-14 14:47:50 +02:00
france_connect_particulier_client_spec.rb specs: always require rails_helper 2020-03-31 12:48:32 +02:00
geo_area_spec.rb specs: avoid creating uneeded champs on geo_area 2021-10-26 12:03:30 +02:00
groupe_instructeur_spec.rb fix(instructeur): copy notifications settings from previous groupe instructeur 2021-12-23 13:55:25 +01:00
individual_spec.rb models: require belong_to associations on individual 2020-08-18 15:57:37 +02:00
instructeur_spec.rb fix(instructeur): copy notifications settings from previous groupe instructeur 2021-12-23 13:55:25 +01:00
invite_spec.rb specs: always require rails_helper 2020-03-31 12:48:32 +02:00
procedure_overview_spec.rb specs: always require rails_helper 2020-03-31 12:48:32 +02:00
procedure_presentation_and_revisions_spec.rb specs: minor cleanups 2021-11-23 08:07:07 +01:00
procedure_presentation_spec.rb fix(dossier): use depose_at instead of en_construction_at 2021-12-06 15:49:17 +01:00
procedure_revision_spec.rb fix(attestation_template): add revision diff support 2022-02-11 08:45:32 +01:00
procedure_spec.rb feat(dossier): rebase dossiers en construction and en instruction 2022-02-18 17:08:38 +01:00
service_spec.rb refuse les numéros de tel invalides 2019-12-04 05:34:43 +01:00
siret_spec.rb specs: always require rails_helper 2020-03-31 12:48:32 +02:00
stat_spec.rb stats: move date formatting out of the Stat model 2022-02-02 14:13:53 +01:00
super_admin_spec.rb models: improve password complexity specs 2021-09-09 09:40:39 -05:00
traitement_spec.rb archives: count archived dossiers 2021-06-18 08:59:13 +02:00
trusted_device_token_spec.rb models: require belong_to associations on trusted_device_token 2020-08-18 15:57:37 +02:00
type_de_champ_private_spec.rb specs: always require rails_helper 2020-03-31 12:48:32 +02:00
type_de_champ_shared_example.rb update models specs to use revisions 2020-09-02 11:26:26 +02:00
type_de_champ_spec.rb specs: always require rails_helper 2020-03-31 12:48:32 +02:00
user_spec.rb test(user): fix unstable spec 2022-02-17 14:45:53 +01:00