feat(dossier): prefill region champ (#8442)
* make regions champ prefillable * add possible and example value * add external_id and value validation
This commit is contained in:
parent
d629a5933a
commit
49ce255e29
17 changed files with 191 additions and 19 deletions
|
@ -9,6 +9,8 @@ describe API::V2::GraphqlController do
|
|||
let(:dossiers) { [dossier] }
|
||||
let(:instructeur) { create(:instructeur, followed_dossiers: dossiers) }
|
||||
|
||||
let(:memory_store) { ActiveSupport::Cache.lookup_store(:memory_store) }
|
||||
|
||||
def compute_checksum_in_chunks(io)
|
||||
Digest::MD5.new.tap do |checksum|
|
||||
while (chunk = io.read(5.megabytes))
|
||||
|
@ -37,6 +39,9 @@ describe API::V2::GraphqlController do
|
|||
end
|
||||
|
||||
before do
|
||||
allow(Rails).to receive(:cache).and_return(memory_store)
|
||||
Rails.cache.clear
|
||||
|
||||
allow(APIGeoService).to receive(:departement_name).with('01').and_return('Ain')
|
||||
instructeur.assign_to_procedure(procedure)
|
||||
end
|
||||
|
@ -392,7 +397,7 @@ describe API::V2::GraphqlController do
|
|||
dossier
|
||||
end
|
||||
|
||||
context "for individual" do
|
||||
context "for individual", vcr: { cassette_name: 'api_geo_regions' } do
|
||||
let(:procedure) { create(:procedure, :published, :for_individual, :with_service, :with_all_champs, :with_all_annotations, administrateurs: [admin]) }
|
||||
let(:query) do
|
||||
"{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue