Commit graph

83 commits

Author SHA1 Message Date
Paul Chavard
a36672239d refactor(revision): rename find_or_clone_type_de_champ 2022-05-31 08:58:53 +02:00
simon lehericey
fd4d543b20 fix test 2022-05-18 15:18:17 +02:00
Paul Chavard
2ba05bfb4f fix(dossier): use depose_at instead of en_construction_at 2021-12-06 15:49:17 +01:00
simon lehericey
5a0fb6237f 😭 AASM does not support keyword arguments
https://github.com/aasm/aasm/issues/672
2021-11-30 09:42:45 +01:00
Paul Chavard
da49a6447f refactor(repetition): optimize and add a transaction around repetition add row 2021-10-28 14:54:33 +02:00
Paul Chavard
74e277d0a2 feat(graphql): add an option to dossier state change mutations to disable notifications 2021-09-07 14:21:48 +02:00
Christophe Robillard
896190b91e return nil when no traitement time 2021-06-17 16:31:53 +02:00
Christophe Robillard
887c5cb4a9 correct rubocop offenses 2021-06-17 16:31:53 +02:00
Christophe Robillard
bdf2f47eb9 fix specs for procedure stats 2021-06-17 16:31:53 +02:00
Christophe Robillard
a8840faadb move stats methods to appropriate concern class 2021-06-17 16:31:53 +02:00
Paul Chavard
9b0dae4cc2 Fix apostrophes ‘ -> ’ 2021-05-26 18:05:14 +02:00
Paul Chavard
21ee79669d Better labels in test 2021-05-25 11:43:38 +02:00
Paul Chavard
179bb5a9fe Apply suggestions from code review
Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>
2021-05-25 11:43:38 +02:00
Paul Chavard
acb277e650 Use stable_id when replacing tags 2021-05-25 11:43:38 +02:00
clemkeirua
f3e487bd9e replace filter+first with find 2020-09-25 12:53:11 +00:00
Paul Chavard
1488e0964b update models specs to use revisions 2020-09-02 11:26:26 +02:00
Christophe Robillard
a072d35211 use traitement model
when a dossier is terminated (accepte, refuse or classe_sans_suite),
we store now `processed_at` and `motivation` in a traitement instance
2020-07-08 18:15:15 +02:00
Pierre de La Morinerie
43569f687e specs: use fixture_file_upload rather than Rack::Test::UploadedFile
This is mostly for consistency (both styles were used before).

Note: we still have to use `Rack::Test::UploadedFile.new` in factories,
because of https://github.com/thoughtbot/factory_bot/issues/385.
2020-07-01 11:13:45 +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
clemkeirua
48d2093577 tag 'groupe instructeur' uniquement si la procedure est routee 2020-02-20 14:48:14 +00:00
clemkeirua
059d80ea34 #4785 ajout d'une balise 'groupe instructeur' 2020-02-20 14:48:14 +00:00
clemkeirua
57a0973c99 added a test to show #4658 does not exist 2020-02-03 15:43:53 +01:00
Pierre de La Morinerie
5fc88eb6a2 specs: fix a flaky repetitions test
The test would sometime fail when the two fields are created in a
different order than expected.
2019-10-24 16:52:29 +02:00
Paul Chavard
b97cbd3402 Serialize champ repetition for tags
closes #4272
2019-09-12 17:23:18 +02:00
Paul Chavard
3b8d3b7967 Add Style/CollectionMethods to rubocop 2019-09-12 14:48:18 +02:00
clemkeirua
7eeddc0b79 using a shared example + scoped to state TERMINE 2019-07-17 11:53:16 +02:00
clemkeirua
b8fa567c81 ajout du tag 'lien document justificatif' 2019-07-17 11:53:16 +02:00
Mathieu Magnin
10d3ba10f2 Before save copy body in rich_body 2019-07-03 13:15:49 +02:00
simon lehericey
ee296f2b44 Use default format for date and datetime champ 2019-06-12 17:48:12 +02:00
clemkeirua
d0794f42d1 fix tag_substitution_concern links for lien attestation 2019-05-07 08:54:29 +02:00
clemkeirua
c98655be52 ellipsis on file input overflow 2019-05-07 08:54:29 +02:00
clemkeirua
0e26bda186 cleanup the tag substitution concern & uniformization 2019-05-07 08:54:29 +02:00
clemkeirua
e4259466b4 nettoyage du tag_substitution_concern 2019-05-07 08:54:29 +02:00
clemkeirua
f8a2598647 ajout du lien vers le justificatif dans la balise --lien attestation-- 2019-05-07 08:54:29 +02:00
clemkeirua
747dc505cc ajout d'un test 2019-05-07 08:54:29 +02:00
Frederic Merizen
b428406fc7 [Fix #3578] No tags for champs that cannot have user input anyway 2019-03-11 10:26:27 +01:00
Frederic Merizen
1d0156f9c6 [#3572] Add tests 2019-03-08 18:32:35 +01:00
clemkeirua
71bff0812c ajout d'un test pour caractériser le cas service = null 2019-02-21 12:34:53 +01:00
clemkeirua
236f73f838 ajout d'une balise pour le nom du service 2019-02-21 12:18:44 +01:00
Frederic Merizen
a255e61556 [#3356] Improve formatting for menus that only have a primary value 2019-02-05 17:35:30 +01:00
Frederic Merizen
a3d7c8de55 [Fix #3356] Add tags for primary menu only / secondary menu only 2019-02-05 17:35:30 +01:00
gregoirenovel
5fa5f2aa37 Bump development gems
- rubocop (0.61.1 → 0.62.0)
2019-01-05 11:47:55 +01:00
simon lehericey
e684cec516 DateTime.new => Time.zone.local 2018-10-26 10:10:20 +00:00
simon lehericey
2238e5bd9f Time.now => Time.zone.now 2018-10-26 10:10:20 +00:00
Pierre de La Morinerie
0526551e71 templates: update link to dossier 2018-09-27 17:22:59 +02:00
gregoirenovel
0c9628c180 Fix some files according the the .editorconfig rules 2018-09-20 16:23:09 +02:00
gregoirenovel
a87e79ac1f Update a test to comply with Rubocop rules 2018-09-20 16:23:09 +02:00
gregoirenovel
00ecae5f93 Procédure → Démarche 2018-09-05 15:46:24 +02:00
gregoirenovel
4b071ecf06 Use enum to the fullest with Dossier.states 2018-08-29 17:31:08 +02:00
gregoirenovel
2d3b553e4d Use enum to the fullest with TypeDeChamp.type_champs 2018-08-29 17:31:08 +02:00