procedure: rename mean_instruction_time
to usual_instruction_time
Ref #2970
This commit is contained in:
parent
87a571d724
commit
5c921182ea
3 changed files with 9 additions and 9 deletions
|
@ -304,15 +304,15 @@ class Procedure < ApplicationRecord
|
|||
end
|
||||
end
|
||||
|
||||
def mean_traitement_time
|
||||
def usual_traitement_time
|
||||
mean_time(:en_construction_at, :processed_at)
|
||||
end
|
||||
|
||||
def mean_verification_time
|
||||
def usual_verification_time
|
||||
mean_time(:en_construction_at, :en_instruction_at)
|
||||
end
|
||||
|
||||
def mean_instruction_time
|
||||
def usual_instruction_time
|
||||
mean_time(:en_instruction_at, :processed_at)
|
||||
end
|
||||
|
||||
|
|
|
@ -31,10 +31,10 @@
|
|||
%strong votre dossier passera directement en instruction
|
||||
|
||||
/ FIXME: remove the custom procedure switch at some point
|
||||
- if dossier.procedure.mean_verification_time && show_time_means
|
||||
- if dossier.procedure.usual_verification_time && show_time_means
|
||||
- cache(dossier.procedure, expires_in: 1.week) do
|
||||
%p
|
||||
Le temps moyen de vérification pour cette démarche est de #{distance_of_time_in_words(dossier.procedure.mean_verification_time)}.
|
||||
Le temps moyen de vérification pour cette démarche est de #{distance_of_time_in_words(dossier.procedure.usual_verification_time)}.
|
||||
|
||||
- elsif dossier.en_instruction?
|
||||
.en-instruction
|
||||
|
@ -46,10 +46,10 @@
|
|||
avec le résultat.
|
||||
|
||||
/ FIXME: remove the custom procedure switch at some point
|
||||
- if dossier.procedure.mean_instruction_time && show_time_means
|
||||
- if dossier.procedure.usual_instruction_time && show_time_means
|
||||
- cache(dossier.procedure, expires_in: 1.week) do
|
||||
%p
|
||||
Le temps moyen d’instruction pour cette démarche est de #{distance_of_time_in_words(dossier.procedure.mean_instruction_time)}.
|
||||
Le temps moyen d’instruction pour cette démarche est de #{distance_of_time_in_words(dossier.procedure.usual_instruction_time)}.
|
||||
|
||||
- elsif dossier.accepte?
|
||||
.accepte
|
||||
|
|
|
@ -705,7 +705,7 @@ describe Procedure do
|
|||
end
|
||||
end
|
||||
|
||||
describe '#mean_instruction_time' do
|
||||
describe '#usual_instruction_time' do
|
||||
let(:procedure) { create(:procedure) }
|
||||
|
||||
context 'when there is only one dossier' do
|
||||
|
@ -719,7 +719,7 @@ describe Procedure do
|
|||
dossier.update(en_instruction_at: instruction_date, processed_at: processed_date)
|
||||
end
|
||||
|
||||
it { expect(procedure.mean_instruction_time).to eq(1.day.to_i) }
|
||||
it { expect(procedure.usual_instruction_time).to eq(1.day.to_i) }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue