demarches-normaliennes/spec
Pierre de La Morinerie e6cf07b810 stats: move date formatting out of the Stat model
Before this commit, the monthly dossiers count was serialized into the
Stat record using human-formatted dates, as:

```ruby
s.dossiers_in_the_last_4_months = {
  "octobre 2021"=>409592,
  "novembre 2021"=>497823,
  "décembre 2021"=>38170,
  "janvier 2022"=>0
}
```

Turns out the ordering of keys in a serialized hash is not guaranteed.
After a round-trip to the database, the keys will be wrongly sorted.

Instead we want to save raw Date objects, which will preserve the
ordering. The date formatting can be applied at display-time by the
controller.

Fix #6848
2022-02-02 14:13:53 +01:00
..
controllers tests 2022-01-31 10:03:44 +01:00
factories Revert "feat(attestation): revise attestations" 2022-01-25 18:26:34 +01:00
fixtures fix(parallel_download_queue): tophoeus does not like raise from a request handler [crash straight to first frame] 2022-01-07 14:24:37 +01:00
graphql fix(graphql): do not crash if attestation is nil 2021-12-08 13:12:42 +01:00
helpers helpers: handle flash[:error] 2022-01-06 14:09:31 +01:00
jobs specs: minor cleanups 2021-11-23 08:07:07 +01:00
lib fix(parallel_download_queue): tophoeus does not like raise from a request handler [crash straight to first frame] 2022-01-07 14:24:37 +01:00
mailers tests 2022-01-25 11:46:05 +01:00
middlewares specs: always require rails_helper 2020-03-31 12:48:32 +02:00
models stats: move date formatting out of the Stat model 2022-02-02 14:13:53 +01:00
policies factories: cleanup Administrateur, Instructeur and Expert factories 2021-10-26 12:03:30 +02:00
serializers fix(dossier): use depose_at instead of en_construction_at 2021-12-06 15:49:17 +01:00
services fix(dossier): do not send notification on expiration when dossier is already deleted 2022-01-19 17:52:53 +01:00
support test(system): simplify select menu selector 2022-01-13 17:49:16 +01:00
system models: validate private types_de_champ 2022-02-01 12:37:16 +01:00
views tests 2022-01-31 10:03:44 +01:00
rails_helper.rb specs: use Instructeur.bypass_email_login_token in the tests 2021-12-02 08:51:52 +01:00
spec_helper.rb Chore(test): enable rspec only-failures support 2021-04-15 14:17:39 +02:00