demarches-normaliennes/spec/models
Colin Darie f972d36f2f test: fix when using timestamps not yet limited by postgresql precision
Sur des colonnes dont le schema ne connait pas le niveau de précision
(créées avant rails 7), rails créé un timestamp avec la précision système
(par exemple 9 décimales sur linux) alors que pg va l'arrondir
a posteriori à 6.

Ce n'est généralement pas un problème en production,
mais se révèle dans les tests typiquement avec des objets crées
par des factories: si un test dépend de ces timestamps,
il faut récupérer la valeur limitée par pg (d'où le reload),
plutôt que celle directement issue de Time.now à la création de l'objet.

Une alternative aurait été de créer une migration pour ces colonnes pour
forcer la précision à 6 et que le schema en aurait pris connaissance:
rails limiterait la précision de lui même dès la création de l'objet.
2023-11-20 11:22:28 +01:00
..
champs Merge pull request #9648 from demarches-simplifiees/add-rnf-service 2023-11-08 09:06:47 +00:00
concern test: fix when using timestamps not yet limited by postgresql precision 2023-11-20 11:22:28 +01:00
logic feat(dossier): commune champ is an autocomplete now 2023-11-07 20:58:39 +01:00
types_de_champ feat(dossier): commune champ is an autocomplete now 2023-11-07 20:58:39 +01:00
administrateur_spec.rb remove admin from manager 2023-10-19 09:14:44 +02:00
api_entreprise_token_spec.rb test: ensure travel_back is automatically called at the right time 2023-06-20 00:04:55 +02:00
api_token_spec.rb tech: add api_token_id to graphql logs 2023-11-08 16:50:10 +01:00
archive_spec.rb fix(archives): purge stuck pending archives 2022-07-27 15:26:59 +02:00
assign_to_spec.rb chore(create_procedure_presentation): homogénéise l'interface sur les procédure présentation. pas d'objet 'build', sinon les export/filtres deviennent compliqués 2022-10-31 09:29:27 +01:00
attestation_template_spec.rb add signature to groupe_instructeur 2023-09-22 10:24:16 +02:00
avis_spec.rb fix(avis): don't list question_answer radios on empty question 2023-03-29 15:42:33 +02:00
batch_operation_spec.rb Overload the finished_at 2023-02-01 17:06:04 +01:00
bill_signature_spec.rb fix(spec): update spec with new timestamp 2022-12-07 19:28:01 +01:00
champ_private_spec.rb specs: always require rails_helper 2020-03-31 12:48:32 +02:00
champ_shared_example.rb Make date and datetime prefillable (#8304) 2023-01-12 17:42:02 +01:00
champ_spec.rb Fix datetime_champ validation with negative time zone 2023-08-02 14:40:47 +02:00
chorus_configuration_spec.rb review(tech): utilise un code unique pr les elements de l'autocomplete, corrections de typos, amelioration du code 2023-11-09 11:10:17 +01:00
commentaire_spec.rb fix(messages): retry stale blobs 2022-11-02 09:19:51 +01:00
condition_form_spec.rb fix(conditional): only parse user input as int if compared with a number 2022-09-09 11:28:32 +02:00
contact_information_spec.rb add contact information model 2023-09-08 11:04:06 +02:00
deleted_dossier_spec.rb specs: remove unused require 2021-03-25 13:24:53 +01:00
dossier_assignment_spec.rb chore(feature flag): remove routing_rules flag call 2023-11-14 17:02:39 +01:00
dossier_preloader_spec.rb feat(dossier): optional repetition champ should not add first row 2023-02-06 11:53:32 +01:00
dossier_spec.rb spec(dossier): improuve dossier with state factories 2023-11-14 23:59:45 +01:00
dossier_transfer_spec.rb fix(dossier_transfer): requires an actual email 2022-08-03 11:44:54 +02:00
dubious_procedure_spec.rb fix(spec): fix dubious procedure spec 2022-10-11 11:50:41 +02:00
email_event_spec.rb refactor(email): remove pseudonymization, it will be done at dump-time 2023-01-10 16:07:35 +01:00
engagement_juridique_champ_spec.rb amelioration(Champs::EngagementJuridiqueChamp): valide le format 2023-11-09 10:09:14 +01:00
etablissement_spec.rb build raison sociale from nom and nom 2023-07-14 16:19:44 +02:00
exercice_spec.rb specs: always require rails_helper 2020-03-31 12:48:32 +02:00
expert_spec.rb fix: a expert merge transfers hidden procedures 2023-08-31 14:26:45 +02:00
experts_procedure_spec.rb experts_procedure should not be optional 2021-03-23 13:46:33 +01:00
export_spec.rb fix(exports): display exact number of dossiers count at time generation 2023-10-09 11:23:16 +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 feat(champ): validate GeoJSON 2023-07-18 18:01:29 +02:00
gestionnaire_spec.rb fix: fixes after tchak s review 2023-10-03 13:51:57 +02:00
groupe_gestionnaire_spec.rb feat: US4.3.9 children management 2023-10-26 10:46:18 +00:00
groupe_instructeur_spec.rb chore(groupe instructeur): move closed validation for defaut groupe to model 2023-08-21 16:31:54 +02:00
individual_spec.rb models: require belong_to associations on individual 2020-08-18 15:57:37 +02:00
instructeur_spec.rb refactor(DossierAssignment): move create_assignment to assign_to_groupe_instructeur 2023-07-18 16:54:00 +02:00
invite_spec.rb accessibilite(pages-authentification): evolutions des pages de connexion/creation de compte pour respecter le DSFR et supporter une meilleure accessibilite 2023-01-03 16:26:05 +01:00
logic_spec.rb compatibility from left 2022-09-28 10:06:31 +02:00
mail_template_spec.rb amelioration(attestion.et.mail): deduplique les message d'erreur, améliore les messages d'erreur, gère la pluralisation des erreurs lorsque plusieurs tags sont concernés 2022-12-19 09:28:46 +01:00
map_filter_spec.rb show france map with stats for each departement 2023-11-16 13:27:12 +01:00
prefill_champs_spec.rb Workable draft prefill identity (no link or query help) 2023-09-07 10:17:19 +02:00
prefill_description_spec.rb Add tests for prefill identity 2023-09-07 10:17:19 +02:00
prefill_identity_spec.rb Add tests for prefill identity 2023-09-07 10:17:19 +02:00
procedure_overview_spec.rb fix(tests): create groupe instructeurs with factory 2023-07-03 14:47:56 +02:00
procedure_presentation_and_revisions_spec.rb refactor(revision): rename find_or_clone_type_de_champ 2022-05-31 08:58:53 +02:00
procedure_presentation_spec.rb bug(filtres): les filtres par type de champs select ne fonctionnent pas 2023-11-14 09:46:29 +01:00
procedure_revision_spec.rb Procedure Revision and tests 2023-10-16 08:53:52 +00:00
procedure_revision_type_de_champ_spec.rb feat(conditional): annotations can be conditioned by champs 2023-11-03 10:45:07 +00:00
procedure_spec.rb amelioration(procedure.duree_conservation_dossiers_dans_ds_changes): reset les flag d'expirations lorsqu'on change la date de conservation des dosseirs d'une procedure 2023-11-17 11:33:14 +01:00
routing_engine_spec.rb feat(dossier): commune champ is an autocomplete now 2023-11-07 20:58:39 +01:00
service_spec.rb refactor(service): explicit call to service job to avoid test side effect 2022-10-25 14:44:43 +02:00
siret_spec.rb specs: always require rails_helper 2020-03-31 12:48:32 +02:00
stat_spec.rb spec(dossier): improuve dossier with state factories 2023-11-14 23:59:45 +01:00
super_admin_spec.rb test(super-admin): more explicit disable otp test 2023-05-03 11:37:28 +02:00
sva_svr_configuration_spec.rb feat(admin): config sva/svr 2023-07-11 10:01:45 +02:00
targeted_user_link_spec.rb feat(invite): wrap invitation with targeted_user_links 2022-06-17 16:44:37 +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 feat(EditComponent): add max_file_size and content_types to upload buttons inspired by dsfr 2022-06-28 17:44:35 +02:00
type_de_champ_spec.rb Add new type de champ expression_reguliere with tests 2023-10-16 08:53:52 +00:00
user_spec.rb amelioration(user.expiration): ajoute une raison specifique a la suppression d'un dossier : user_expired 2023-11-17 11:33:14 +01:00
zone_spec.rb determine default zones according to tchap hs 2023-05-16 09:40:53 +02:00