Commit graph

116 commits

Author SHA1 Message Date
Martin
2952987ad8 refactor(spec): stop using procedure type de champs traits as :with_datetime, :with_xxx in favor of :types_de_champ_public which keeps position in check 2024-01-23 17:30:22 +01:00
Paul Chavard
a2ed35d44e spec(dossier): improuve dossier with state factories 2023-11-14 23:59:45 +01:00
simon lehericey
4be682145c spec: speed up by 3 2023-09-20 14:11:10 +02:00
simon lehericey
4a17dec87b refactor procedure_controller 2023-09-20 14:11:10 +02:00
simon lehericey
40a15b9be4 refactor dossier_controller 2023-09-20 14:11:10 +02:00
simon lehericey
118242dbd2 refactor api_controller 2023-09-20 14:11:09 +02:00
Paul Chavard
5abb6a8f12 chore(spec): remove memory store cache from tests 2023-04-13 13:10:23 +02:00
Damien Le Thiec
2533ca50d4 Merge branch 'main' into feature/prefill_repetible 2023-02-15 11:07:56 +01:00
Sébastien Carceles
12abf9045b add external_id and value validation 2023-02-14 09:23:11 +01:00
Damien Le Thiec
a51ed0094b Fix tests 2023-02-07 00:28:21 +01:00
Martin
48c80e9387 correctif(api/v1): ajoute la methode manquante for_api sur le type de champs departement 2022-12-27 11:45:43 +01:00
Paul Chavard
a47a056ee8 feat(api_token): api v1 use new token 2022-12-07 18:19:37 +01:00
Colin Darie
4ba76e6844 fix(api-v1): dossier -> avis -> piece_justificative_file_attachment relation name 2022-12-06 11:48:42 +01:00
Paul Chavard
c5901fbb95 clean(type_de_champ): remove magic factory 2022-12-01 16:36:59 +01:00
Paul Chavard
29bdd82b59 refactor(procedure): types_de_champ -> active_revision.types_de_champ_public 2022-11-17 13:54:14 +01:00
Martin
1f8bf201a2 feat(procedure_serializer): just add an empty string for direction 2022-10-07 18:39:17 +02:00
Martin
6752da40a9 test(procedure.direction): can we drop this column ? 2022-10-07 18:39:17 +02:00
Paul Chavard
430365768a test(dossier.pdf): add a test case with piece_justificative inside repetition 2022-07-21 11:46:28 +02:00
Paul Chavard
02675a104d fix(revision): fix tests to use new revison system 2022-05-31 08:58:53 +02:00
Pierre de La Morinerie
b06183d7bf specs: rename Dossier's with_all_champs to with_populated_champs
This better reflects what the trait is used for, and disambiguate it
from the similarly named trait in the Procedure factory.
2021-11-03 19:38:01 +01:00
Paul Chavard
6a33a8e48b update controllers specs to use revisions 2020-09-02 11:26:26 +02:00
Christophe Robillard
792e755af9 expose effectif_annuel dans api graphql 2020-04-23 09:53:27 +02:00
Christophe Robillard
149b98007f add effectif mensuel to graphql api 2020-04-21 21:13:07 +02:00
Pierre de La Morinerie
4cb747fdb6 specs: always require rails_helper
Test helpers are separated between two files: spec_helper and
rails_helper. This separation is meant to allow tests that do not
require Rails (like testing standalone libs) to boot faster.

The spec_helper file is always loaded, through `--require spec_helper`
in the `.rspec` config file. When needed, the rails_helper file is
expected to be required manually.

This is fine, but:
- Many test files have a redundant `require 'spec_helper'` line;
- Many test files should require `rails_helper`, but don't.

Not requiring `rails_helper` will cause the Rails-concerned section of
the test environment not to be configured–which may cause subtle bugs
(like the test database not being properly initialized).

Moreover, Spring loads all the Rails files on preloading anyway. So the
gains from using only `spec_helper` are thin.

To streamline this process, this commit:
- Configures `.rspec` to require `rails_helper` by default;
- Remove all manual requires to spec_helper or rails_helper.

Reference: https://stackoverflow.com/questions/24145329/how-is-spec-rails-helper-rb-different-from-spec-spec-helper-rb-do-i-need-it
2020-03-31 12:48:32 +02:00
Paul Chavard
7b947feae4 Rename demarche archivée to demarche close 2019-11-28 15:07:16 +01:00
pedong
25596ca2f2 [fix #4181] add service to procedure API 2019-09-10 11:06:28 +02:00
Paul Chavard
b8d3e4c41b Fix attestation url for dossiers with no attestation 2019-08-01 15:53:50 +02:00
Paul Chavard
b266915892 Add repetitions to api 2019-08-01 10:04:35 +02:00
Paul Chavard
fba195c0b5 Add attestation url to dossier on api 2019-07-31 18:30:40 +02:00
Pierre de La Morinerie
f69f325236 api: remove export of old pieces justificatives 2019-07-30 16:11:17 +02:00
Paul Chavard
0d80c48b7e Add avis to api 2019-06-27 14:40:17 +02:00
Paul Chavard
1781a49932 Add order param to API 2019-06-20 15:28:16 +02:00
clemkeirua
4aab72be68 implementation du systeme de PJ de motivation 2019-05-07 08:54:29 +02:00
Paul Chavard
d988638c58 Simplify API carte serializer 2018-11-27 16:11:25 +01:00
Paul Chavard
0b017580c5 Expose migrated legacy carto champs on api 2018-11-20 10:53:14 +01:00
Paul Chavard
fe630847e9 Refactor legacy carto serializer 2018-11-20 10:53:14 +01:00
Paul Chavard
80189def98 Remove n+1 calls from API queries 2018-11-08 14:45:09 +01:00
simon lehericey
2f2f1e1321 Let the API return times in UTC for now 2018-10-31 11:43:48 +01:00
simon lehericey
9475795143 fix spec 2018-10-26 10:10:20 +00:00
Paul Chavard
4ebc0b7f4c Refactor link attribute generation on ProcedureSerializer 2018-10-22 23:28:16 +02:00
gregoirenovel
ed11852300 Delete the InviteGestionnaire model 2018-10-10 12:07:10 +02:00
simon lehericey
2288303de9 [fix #2777] DossiersSerializer: add state 2018-10-08 18:36:49 +02:00
simon lehericey
912371fbd6 DossierController: use new token validation 2018-09-27 10:24:56 +02:00
simon lehericey
3c95273d6f ProcedureController: use new token validation 2018-09-27 10:24:56 +02:00
simon lehericey
6837c79dd1 Spec: use have_http_status matcher 2018-09-27 10:24:56 +02:00
simon lehericey
2b46a56259 Spec: simplify 2018-09-27 10:24:56 +02:00
simon lehericey
d14944fba3 Spec: mutualize subject 2018-09-27 10:24:56 +02:00
simon lehericey
7b27f00a23 Spec: do not use the deprecated api_token 2018-09-27 10:24:56 +02:00
simon lehericey
9a6e985bac Spec: remove useless require 2018-09-27 10:24:56 +02:00
simon lehericey
674d231194 Spec: add spaces for readability 2018-09-27 10:24:56 +02:00