demarches-normaliennes/spec/models
simon lehericey 3685c65fb7 [fix #2905] fix DATE_TRUNC usage
DATE_TRUNC is played on the db where the timestamp are stored in utc.
So if a user search for 12/12/2012 in Paris timezone and that we truncate it should do something similar to :

SELECT DATE_TRUNC('day', foo.timezone) from (SELECT timestamp '2012-12-12 00:00:00' AT TIME ZONE 'Europe/Paris') as foo;
=> 2012-12-11

To avoid such pb, I suggest avoiding DATE_TRUNC when exact results are needed
2018-10-26 10:10:20 +00:00
..
champs [fix #2358] Checkbox: serialize in attestation by oui or no 2018-08-10 16:25:34 +02:00
concern DateTime.new => Time.zone.local 2018-10-26 10:10:20 +00:00
types_de_champ [Fix #2258] Validate options for linked dropdown menus 2018-09-25 20:32:19 +02:00
administrateur_spec.rb Administrateur: do not save api_token in clear text anymore 2018-09-27 10:24:56 +02:00
administration_spec.rb Always create a corresponding User account for Admin accounts 2018-04-12 16:40:24 +02:00
assign_to_spec.rb [Fix #2604] Handle ProcedurePresentations that have gone invalid 2018-10-23 16:41:51 +02:00
attestation_template_spec.rb Time.now => Time.zone.now 2018-10-26 10:10:20 +00:00
avis_spec.rb [Fix #1972] Always send mails asynchronously 2018-05-28 12:02:13 +02:00
cadastre_spec.rb Add Cadastre table 2016-01-15 15:28:56 +01:00
champ_private_spec.rb Unify :type_de_champ public/private factories 2018-02-14 11:49:06 +01:00
champ_shared_example.rb Better handle empty user selection layers 2018-10-23 09:35:25 +02:00
champ_spec.rb [#2179] Generate denormalized search terms value for Dossier 2018-07-27 11:11:52 +02:00
commentaire_spec.rb Add constants for email addresses 2018-06-01 00:00:11 +02:00
dossier_spec.rb DateTime.parse => Time.zone.parse 2018-10-26 10:10:20 +00:00
drop_down_list_spec.rb Spec STI loading champ/type de champ 2018-03-29 17:45:19 +02:00
etablissement_spec.rb Add sign and verify to etablissement 2018-04-04 18:44:08 +02:00
exercice_spec.rb Remove useless tests 2017-07-19 13:32:59 +02:00
france_connect_information_spec.rb FC information: remove funny find_by 2018-01-15 17:14:12 +01:00
france_connect_particulier_client_spec.rb describe '#method' rather than describe '.method' for instance methods 2018-03-20 16:00:30 +01:00
gestionnaire_spec.rb DateTime.new => Time.zone.local 2018-10-26 10:10:20 +00:00
individual_spec.rb Individual: remove birthdate proxy 2018-04-04 15:27:30 +02:00
invite_spec.rb Remove duplicate translations 2018-06-01 15:21:25 +02:00
module_api_carto_spec.rb Remove the unused ModuleApiCarto#classes method 2018-10-15 16:16:16 +02:00
piece_justificative_spec.rb [Fix #2833] Move /support files to /fixtures 2018-10-16 10:47:41 +02:00
procedure_overview_spec.rb DateTime.new => Time.zone.local 2018-10-26 10:10:20 +00:00
procedure_path_spec.rb Enable the Layout/SpaceInsideBlockBraces cop 2018-01-18 10:53:34 +01:00
procedure_presentation_spec.rb [fix #2905] fix DATE_TRUNC usage 2018-10-26 10:10:20 +00:00
procedure_spec.rb Time.new => Time.zone.local 2018-10-26 10:10:20 +00:00
quartier_prioritaire_spec.rb [Fix #2833] Move /support files to /fixtures 2018-10-16 10:47:41 +02:00
service_spec.rb Use enum to the fullest with Service.type_organismes 2018-08-29 17:31:08 +02:00
siret_spec.rb [Fix #2618] Do not enforce Luhn for La Poste SIRET numbers 2018-09-19 10:29:43 +02:00
type_de_champ_private_spec.rb Unify :type_de_champ public/private factories 2018-02-14 11:49:06 +01:00
type_de_champ_shared_example.rb [#2258] Let dynamic type validate the type de champ 2018-09-25 20:31:34 +02:00
type_de_champ_spec.rb Fix public and private champs scopes 2018-02-14 18:13:23 +01:00
type_de_piece_justificative_spec.rb Remove useless tests 2017-07-19 13:32:59 +02:00
user_spec.rb InviteUser → Invite 2018-10-10 12:07:10 +02:00