Merge pull request #6508 from betagouv/main

This commit is contained in:
Pierre de La Morinerie 2021-09-30 16:54:37 +02:00 committed by GitHub
commit 11269df027
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 10 additions and 6 deletions

View file

@ -441,7 +441,7 @@ GEM
ruby2_keywords (~> 0.0.1)
netrc (0.11.0)
nio4r (2.5.8)
nokogiri (1.12.4)
nokogiri (1.12.5)
mini_portile2 (~> 2.6.1)
racc (~> 1.4)
open4 (1.3.4)

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View file

@ -1,5 +1,5 @@
import { QueryClient } from 'react-query';
import { isNumeric } from '@utils';
import { getJSON, isNumeric } from '@utils';
import { matchSorter } from 'match-sorter';
const API_EDUCATION_QUERY_LIMIT = 5;
@ -73,7 +73,7 @@ async function defaultQueryFn({ queryKey: [scope, term] }) {
let paysCache;
async function getPays() {
if (!paysCache) {
paysCache = await fetch('/api/pays').then((response) => response.json());
paysCache = await getJSON('/api/pays', null);
}
return paysCache;
}

View file

@ -1,6 +1,10 @@
module FileValidationConcern
extend ActiveSupport::Concern
class_methods do
# This method works around missing `%{min_size}` and `%{max_size}` variables in active_record_validation
# default error message.
#
# Hopefully this will be fixed upstream in https://github.com/igorkasyanchuk/active_storage_validations/pull/134
def file_size_validation(file_max_size = 200.megabytes)
{ less_than: file_max_size, message: I18n.t('errors.messages.file_size_out_of_range', file_size_limit: ActiveSupport::NumberHelper.number_to_human_size(file_max_size)) }
end

View file

@ -19,4 +19,4 @@
target: '_blank'
%p
Penser bien à préciser que votre demande concerne le <b>dossier Nº #{dossier.id}</b>.
Pensez bien à préciser que votre demande concerne le <b>dossier Nº #{dossier.id}</b>.

View file

@ -110,7 +110,7 @@ describe Users::ProfilController, type: :controller do
it "transfer all dossiers" do
expect(created_transfer.email).to eq(next_owner)
expect(created_transfer.dossiers).to eq(dossiers)
expect(created_transfer.dossiers).to match_array(dossiers)
expect(flash.notice).to eq("Le transfert de 3 dossiers à #{next_owner} est en cours")
end
end