kara Diaby
ba6b89743c
put pending testsz
2020-07-13 12:24:48 +02:00
Christophe Robillard
2c56511204
validate api_entreprise_token
2020-07-08 18:59:22 +02:00
Christophe Robillard
0be4b50ade
update usual_traitement_time with traitement model
2020-07-08 18:15:15 +02:00
Paul Chavard
6a24c3f812
Rails app:update
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
f587e6600a
extract class ApiEntrepriseToken
...
and check if token is expired
2020-05-06 10:57:45 +02:00
Christophe Robillard
ddd3e6bb02
don't copy api_entreprise_token when cloning
...
except for an admin who owns the parent procedure
2020-04-29 17:17:20 +02:00
Paul Chavard
e512870fd2
Cleanup procedure duree_conservation_dossiers_dans_ds validations
2020-04-16 19:40:19 +02:00
clemkeirua
ed45c88bdf
do not clone groups instructeurs for admin outside the procedure
2020-04-07 09:25:40 +02:00
pedong
7806a26e2c
copy groupe_instructeurs when clone
2020-04-07 09:22:33 +02:00
Paul Chavard
876e05aed3
Discard demarches from manager
2020-03-31 17:08:28 +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
kara Diaby
1f27652cd3
add files validations to models
2020-03-23 11:28:13 +01:00
Paul Chavard
24d237de9e
A cloned procedure should not have canonical relationship
2020-02-25 15:26:43 +01:00
Paul Chavard
b7051da278
Remove old export code
2020-02-19 18:19:17 +01:00
Paul Chavard
1ce1c1e6d0
use discard
2020-02-13 12:31:59 +01:00
Pierre de La Morinerie
1448d5b098
models: add a Procedure#with_hidden scope, and remove unscoped
usages
...
This avoids the broad use of `unscoped` to remove the `hidden_at`
clause.
2020-01-28 17:32:38 +01:00
Paul Chavard
67dea1ee50
Update spec/models/procedure_spec.rb
...
Co-Authored-By: Pierre de La Morinerie <kemenaran@gmail.com>
2020-01-28 12:49:53 +01:00
Paul Chavard
517ab25783
Register canonical procedure when demarche republished under existing path
2020-01-28 12:49:53 +01:00
Paul Chavard
2f060fc30a
Add depubliee state to procedures
2019-12-04 16:52:41 +01:00
Paul Chavard
7b947feae4
Rename demarche archivée to demarche close
2019-11-28 15:07:16 +01:00
Paul Chavard
3e334a3306
Drop test_started_at
...
# Conflicts:
# spec/models/procedure_spec.rb
2019-11-28 14:17:47 +01:00
Pierre de La Morinerie
a458693a19
specs: fix #usual_traitement_time tests when near the DST date
2019-11-04 10:56:15 +01:00
Pierre de La Morinerie
a462edb9bc
instructeurs: alias instructeur.email
...
This also means we need to replace instances of `pluck` on the email
column.
2019-11-04 10:44:24 +01:00
clemkeirua
43424e4f4e
merge with the work of paul, using 3 links
2019-10-22 09:51:14 +02:00
Nicolas Bouilleaud
c26a701a17
Refactor and redesign publish modal
...
* remove the autocomplete menu
* use ujs to pre-validate the procedure
* tweak the UI
2019-09-17 16:30:48 +02:00
Nicolas Bouilleaud
bd1e0aba38
Add Procedure path suggestion
2019-09-17 16:30:48 +02:00
simon lehericey
b541ef0b41
Procedure has many instructeurs with defaut_groupe_instructeur
2019-09-02 11:41:12 +02:00
simon lehericey
ba24958035
Procedure add missing_instructeurs?
2019-09-02 11:41:12 +02:00
simon lehericey
115d91387c
A procedure has a default groupe instructeur
2019-09-02 11:41:12 +02:00
clemkeirua
188e0fd6b2
removed ask_birthday for new procedures & dossiers
2019-08-27 15:32:17 +02:00
simon lehericey
3fde2a6f70
Rename gestionnaire in code to instructeur
2019-08-12 13:47:01 +02:00
Pierre de La Morinerie
0da0a2b446
model: remove support for cloning procedures with old pj
2019-07-30 16:11:17 +02:00
Nicolas Bouilleaud
b066ccbc89
Make sure Procedure.path is not null in our data
2019-07-29 13:53:33 +02:00
clemkeirua
6f47655301
rendu lien_site_web obligatoire au moment de la publication
2019-07-25 15:46:04 +02:00
clemkeirua
6d43465ee5
renammed into monavis_embed
2019-07-17 18:04:32 +02:00
clemkeirua
c8f9e3b5f8
automated test
2019-07-17 18:04:32 +02:00
Nicolas Bouilleaud
df865e71dc
Make sure that there always is at least one administrator per Procedure
2019-05-06 16:19:08 +02:00
Pierre de La Morinerie
d855468cb6
dossiers: display the estimate of the entire processing time
...
Displaying separate estimations for en_construction and en_instruction
doesn't really make sense for the users: they want to know how
long it is going to take overall, not the petty details of our workflow.
2019-04-30 15:56:27 +02:00
Pierre de La Morinerie
e34c556f29
procedure: fix specs
...
When the time computations are done accross a Daylight Saving Time
change, they may be off by one hour.
It doesn't matter, as the estimated delay is counted in days, not
hours.
2019-04-08 15:24:44 +02:00
Paul Chavard
639facaf2a
Add new types_de_champ#move api
2019-04-03 14:38:07 +02:00
Mathieu Magnin
27c8e9dcb8
Use the same clone_attachment method for all attributes on procedure.clone
2019-03-28 17:17:29 +01:00
Mathieu Magnin
4e27872a25
[ Fix #3650 ] when cloning a procedure, do not forget pj_templates
2019-03-26 15:31:09 +01:00
Pierre de La Morinerie
b1a7018d30
procedure: ignore bad data when computing usual_instruction_time
...
Fix #3655
2019-03-20 17:48:54 +01:00
Pierre de La Morinerie
ed1f6ec38d
procedure: fix verification delay
...
The verification delay was ignoring all dossiers not closed yet.
2019-03-19 15:51:51 +01:00
Paul Chavard
bb8ba75d22
Explicitly pass current_administrateur on publish
2019-03-12 11:59:01 +01:00
Paul Chavard
c37f649453
Update specs to use multiple administrateurs
2019-03-12 11:59:01 +01:00
Mathieu Magnin
44f28ec565
Remove feature flag for publish draft
2019-03-12 11:26:07 +01:00
Paul Chavard
84383fc3c1
Assigne admins to procedure.administrateurs
2019-02-20 17:10:57 +01:00
Frederic Merizen
5e37400834
[ #2180 ] Only retain old PJ API when cloning for same admin
2019-01-17 17:40:40 +01:00