Commit graph

22 commits

Author SHA1 Message Date
Paul Chavard
22604013d0 Expose multiple user selections on champ carte 2020-04-15 18:07:09 +02:00
Paul Chavard
52d2ace823 Remove quartiers prioritaires 2020-04-14 10:29:59 +02:00
Pierre de La Morinerie
6417c0d2c0 dossiers: allow auto upload of attachments 2020-03-31 13:09:44 +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
c281347da1 Remove restclient 2020-03-17 11:12:14 +01:00
Paul Chavard
2f633b5d23 Load leaflet from a separate chunk 2019-05-02 14:10:48 +02:00
Pierre de La Morinerie
e06e32238c api_entreprise: display a specific error message on network errors 2019-05-02 11:24:38 +02:00
Pierre de La Morinerie
7c1c61248e spec: cleanup siret_controller_spec.rb 2019-05-02 11:24:22 +02:00
simon lehericey
f945b9ec63 Champ Siret: Fix siret-champ save
When a user enter a siret, it calls siret_controller in ajax. The champ value is stil nil, so champ.present? is false because champ.blank is redefined to focus on value. Thus the champ is not updated.
2019-04-02 14:17:21 +02:00
Paul Chavard
69a51e3296 Save SIRET data on search 2019-03-19 16:22:42 +01:00
Pierre de La Morinerie
803364490d carto: present API InternalServerError to the user, instead of failing 2019-01-28 18:22:55 +01:00
Paul Chavard
d77a5c9f15 More tests and fixes on carte champ 2018-11-30 13:28:30 +01:00
Paul Chavard
febf625dd9 Make difference between error and empty geo json 2018-11-27 12:36:10 +01:00
Paul Chavard
f2e7feec1d Do not send error json to backend - it doesn’t need it and it creates bad data 2018-11-27 11:45:24 +01:00
Paul Chavard
c99ef811b6 Do not save error json in database 2018-11-21 13:03:01 +01:00
Paul Chavard
9ac85295c6 Do not serialize properties on carte champs 2018-11-06 14:26:32 +01:00
Paul Chavard
c0344fc30e Fix procedures with multiple dossier link champs 2018-10-24 10:44:28 +02:00
Paul Chavard
5a8a4b393f Add RPG carte source 2018-10-23 18:13:44 +02:00
Paul Chavard
c4d790b4d0 Test champs carte controller 2018-10-23 09:35:25 +02:00
gregoirenovel
ed240cb4d3 Enable Style/UnneededInterpolation 2018-10-03 12:03:21 +02:00
Paul Chavard
55a9b31b93 Cleanup SIRET champ 2018-09-12 15:53:02 +02:00
Paul Chavard
c49db4b5a4 Add a champs/dossier_link endpoint and use it to fetch dossier info 2018-09-07 19:41:33 +01:00