clemkeirua
f96377d878
refactor Dossier#with_notifications
2020-09-21 08:28:42 +00:00
clemkeirua
d01a53eb72
remove :cached_notifications gate
2020-09-21 08:28:42 +00:00
clemkeirua
a62907f33b
add more tests for phone numbers
2020-09-09 09:00:03 +02:00
clemkeirua
b7b61e79ab
test fonctionnel notification champ
2020-09-08 15:40:42 +00:00
clemkeirua
1fafcad401
test fonctionnel notifications commentaire
2020-09-08 15:40:42 +00:00
Judith
7eee9beed7
adapting the specs
2020-09-01 16:48:41 +02:00
Pierre de La Morinerie
c1e2928ce7
models: require belong_to associations on assign_to
2020-08-18 15:57:36 +02:00
clemkeirua
c772c3454c
update dossier after saving champ
...
update last_champ_updated_at without hook
update last_champ_private_updated_at without hook
Co-authored-by: Christophe Robillard <christophe.robillard@beta.gouv.fr>
2020-07-30 10:18:44 +02:00
clemkeirua
f3a675c3bc
update dossier after saving commentaire
...
update last_commentaire_updated_at without hook
Co-authored-by: Christophe Robillard <christophe.robillard@beta.gouv.fr>
2020-07-30 10:18:44 +02:00
clemkeirua
c91e231347
spec: replace reference to ds in password
2020-07-23 16:20:16 +02:00
Christophe Robillard
f631acd118
update state date in aasm after callbacks
...
call aasm event methods, not state methods directly
2020-07-08 18:15:15 +02:00
Pierre de La Morinerie
2261c6c5d2
specs: refactor dossiers_controller_spec
2020-07-07 18:03:56 +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
Christophe Robillard
eebfb5ee5b
update dossiers_controller when updating siret
...
now, `ApiEntrepriseService` does'nt return a hash anymore but an
etablissement which is already persisted.
2020-05-20 11:09:54 +02:00
Christophe Robillard
dbf04dd0d8
make api entreprise call only if token not expired
2020-05-06 10:57:45 +02:00
Christophe Robillard
b12226c667
fetch and store bilans bdf
2020-04-30 16:15:16 +02:00
Christophe Robillard
3ddb5a4cb4
store attestation fiscale and display
2020-04-30 11:39:54 +02:00
Christophe Robillard
158b4802ab
store attestation sociale and display
2020-04-29 16:25:47 +02:00
Christophe Robillard
339066778d
send notif only to the right instructeurs
...
after a dossier creation, only the instructeurs that belong to the group
instructeur of the dossier, and who want notif will be notified by mail
2020-04-23 13:01:57 +02:00
Christophe Robillard
453adf3c74
instructeurs: affiche l'effectif moyen annuel n-1
2020-04-23 09:53:27 +02:00
Christophe Robillard
1165f8483d
rename effectif columns
2020-04-21 21:13:07 +02:00
Christophe Robillard
db3ef195ad
fetch and show effectif mensuel
...
- fetch and store effectif mensuel (at the creation of the dossier or
when updating a siret field
- show effectif mensuel only for instructeurs
2020-04-21 14:22:11 +02:00
Christophe Robillard
f683b850c3
Notifie instructeurs le souhaitant lors depot dossier
...
Notifie par mail uniquement les instructeurs qui le souhaitent à chaque dépôt de dossier
2020-04-09 15:02:05 +02:00
Christophe Robillard
ae18ff6627
Notifie tous les instructeurs lors dépôt dossier
...
- envoie un mail à tous les instructeurs d'une procédure après le dépôt
d'un nouveau dossier
2020-04-09 14:33:56 +02:00
Christophe Robillard
969478b706
Envoie une notif aux followers_instructeurs le souhaitant
...
après chaque message déposé par l'usager
2020-04-09 14:17:07 +02:00
Christophe Robillard
415d5c765e
envoie une notification à chaque follower_instructeur après un commentaire déposé
2020-04-09 14:17: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
clemkeirua
1c3573c7db
fix DoubleRender error for brouillon pdf
2020-01-29 14:24:23 +01:00
Pierre de La Morinerie
724ff50363
factories: rename dossier for_individual
to with_individual
...
This clarifies the distinction between
```
create :procedure, :for_individual
```
and
```
create :dossier, :with_individual
```
2020-01-21 17:24:56 +01:00
clemkeirua
0c2ccb4ae0
added automated tests for PDF rendering
...
- as a user, it should not display the administration info
- as an instructeur, it should display the administration info
- it should render the proper view with no crash
2020-01-14 09:29:29 +01:00
Paul Chavard
c6326bfa77
Fix tests involving attachment urls
2020-01-08 14:46:18 +01:00
simon lehericey
058442c84e
[link to #4557 ] An instructeur cannot change its email on its own
2019-12-11 17:18:21 +01:00
simon lehericey
e06733d01b
Clean spec
2019-12-11 17:18:21 +01:00
Paul Chavard
7b947feae4
Rename demarche archivée to demarche close
2019-11-28 15:07:16 +01:00
Pierre de La Morinerie
8b8a96abda
dossiers: save draft by default (instead of submitting)
...
Make the default behavior of `update_brouillon` be to update the draft,
instead of submitting the dossier.
This makes all requests made to `update_brouillon` without specifying
an extra `submit_draft` parameter to just save the draft. It will make
autosaving the draft easier and safer.
2019-11-20 11:24:31 +01:00
Paul Chavard
3b8d3b7967
Add Style/CollectionMethods to rubocop
2019-09-12 14:48:18 +02:00
Paul Chavard
347f03d2a9
Redirect to pdf attachement old name if not attached
2019-09-10 15:06:47 +02:00
simon lehericey
7b9b90a3e0
[ fix #4238 ] When the token does not exist, redirect to home page without sending a new link
2019-08-27 15:01:46 +02:00
simon lehericey
7ffad1e6ae
Spec: factorize
2019-08-27 15:01:46 +02:00
simon lehericey
e9cabafcc5
Spec: resend token if it's invalid
2019-08-27 15:01:46 +02:00
simon lehericey
80cb8b87fe
Keep only the FC logic and use devise for the rest
2019-08-16 16:48:22 +02:00
simon lehericey
54d7effe28
Spec: specify france_connect logic
2019-08-16 16:48:22 +02:00
simon lehericey
4be9c79e03
Spec : specify remember me
2019-08-16 16:48:22 +02:00
simon lehericey
08bb393ced
Spec: specify locked logic
2019-08-16 16:48:22 +02:00
simon lehericey
1b14d85c77
Rerender if wrong credentials
2019-08-16 16:48:22 +02:00
simon lehericey
9a6b3c3757
Spec: specify the redirections when logged in
2019-08-16 16:48:22 +02:00
simon lehericey
56d34173e6
Spec: remove multi devise account tests
2019-08-16 12:04:54 +02:00
simon lehericey
95cd301d0d
Spec: remove superfluous code
2019-08-16 11:47:53 +02:00
simon lehericey
f87e316a5d
Spec: remove outdated trusted_device logic
...
This is tested on the application controller
2019-08-16 11:45:40 +02:00
simon lehericey
58ecf18390
ActivateController: add tests and clean a bit
2019-08-16 11:22:36 +02:00