Rename gestionnaire in code to instructeur
This commit is contained in:
parent
6902f84b85
commit
3fde2a6f70
175 changed files with 1162 additions and 1162 deletions
|
@ -1,10 +1,10 @@
|
|||
describe 'gestionnaires/avis/instruction.html.haml', type: :view do
|
||||
describe 'instructeurs/avis/instruction.html.haml', type: :view do
|
||||
let(:avis) { create(:avis, confidentiel: confidentiel) }
|
||||
|
||||
before do
|
||||
assign(:avis, avis)
|
||||
@dossier = create(:dossier, :accepte)
|
||||
allow(view).to receive(:current_gestionnaire).and_return(avis.gestionnaire)
|
||||
allow(view).to receive(:current_instructeur).and_return(avis.instructeur)
|
||||
end
|
||||
|
||||
subject { render }
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
describe 'gestionnaires/dossiers/envoyer_dossier_block.html.haml', type: :view do
|
||||
describe 'instructeurs/dossiers/envoyer_dossier_block.html.haml', type: :view do
|
||||
let(:dossier) { create(:dossier) }
|
||||
|
||||
subject do
|
||||
render(
|
||||
'gestionnaires/dossiers/envoyer_dossier_block.html.haml',
|
||||
'instructeurs/dossiers/envoyer_dossier_block.html.haml',
|
||||
dossier: dossier,
|
||||
potential_recipients: potential_recipients
|
||||
)
|
||||
end
|
||||
|
||||
context "there are other gestionnaires for the procedure" do
|
||||
let(:gestionnaire) { create(:gestionnaire, email: 'yop@totomail.fr') }
|
||||
let(:potential_recipients) { [gestionnaire] }
|
||||
context "there are other instructeurs for the procedure" do
|
||||
let(:instructeur) { create(:instructeur, email: 'yop@totomail.fr') }
|
||||
let(:potential_recipients) { [instructeur] }
|
||||
|
||||
it { is_expected.to have_css("select > option[value='#{gestionnaire.id}']") }
|
||||
it { is_expected.to have_css("select > option[value='#{instructeur.id}']") }
|
||||
it { is_expected.to have_css(".button.send") }
|
||||
end
|
||||
|
||||
context "there is no other gestionnaire for the procedure" do
|
||||
context "there is no other instructeur for the procedure" do
|
||||
let(:potential_recipients) { [] }
|
||||
|
||||
it { is_expected.not_to have_css("select") }
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
describe 'gestionnaires/dossiers/state_button_motivation.html.haml', type: :view do
|
||||
describe 'instructeurs/dossiers/state_button_motivation.html.haml', type: :view do
|
||||
let(:dossier) { create(:dossier, :en_instruction) }
|
||||
|
||||
subject! do
|
||||
render(
|
||||
'gestionnaires/dossiers/state_button_motivation.html.haml',
|
||||
'instructeurs/dossiers/state_button_motivation.html.haml',
|
||||
dossier: dossier,
|
||||
popup_title: 'Accepter le dossier',
|
||||
placeholder: 'Expliquez au demandeur pourquoi ce dossier est accepté (facultatif)',
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
describe 'gestionnaires/dossiers/print.html.haml', type: :view do
|
||||
describe 'instructeurs/dossiers/print.html.haml', type: :view do
|
||||
before { view.extend DossierHelper }
|
||||
|
||||
context "with a dossier" do
|
||||
let(:current_gestionnaire) { create(:gestionnaire) }
|
||||
let(:current_instructeur) { create(:instructeur) }
|
||||
let(:dossier) { create(:dossier, :en_instruction, :with_commentaires) }
|
||||
|
||||
before do
|
||||
assign(:dossier, dossier)
|
||||
allow(view).to receive(:current_gestionnaire).and_return(current_gestionnaire)
|
||||
allow(view).to receive(:current_instructeur).and_return(current_instructeur)
|
||||
|
||||
render
|
||||
end
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
describe 'gestionnaires/dossiers/show.html.haml', type: :view do
|
||||
let(:current_gestionnaire) { create(:gestionnaire) }
|
||||
describe 'instructeurs/dossiers/show.html.haml', type: :view do
|
||||
let(:current_instructeur) { create(:instructeur) }
|
||||
let(:dossier) { create(:dossier, :en_construction) }
|
||||
|
||||
before do
|
||||
sign_in current_gestionnaire
|
||||
sign_in current_instructeur
|
||||
assign(:dossier, dossier)
|
||||
end
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
describe 'gestionnaires/procedures/_download_dossiers.html.haml', type: :view do
|
||||
let(:current_gestionnaire) { create(:gestionnaire) }
|
||||
describe 'instructeurs/procedures/_download_dossiers.html.haml', type: :view do
|
||||
let(:current_instructeur) { create(:instructeur) }
|
||||
let(:procedure) { create(:procedure) }
|
||||
|
||||
subject { render 'gestionnaires/procedures/download_dossiers.html.haml', procedure: procedure }
|
||||
subject { render 'instructeurs/procedures/download_dossiers.html.haml', procedure: procedure }
|
||||
|
||||
context "when procedure has 0 dossier" do
|
||||
it { is_expected.not_to include("Télécharger tous les dossiers") }
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe 'gestionnaires/shared/avis/_list.html.haml', type: :view do
|
||||
describe 'instructeurs/shared/avis/_list.html.haml', type: :view do
|
||||
before { view.extend DossierHelper }
|
||||
|
||||
subject { render 'gestionnaires/shared/avis/list.html.haml', avis: avis, avis_seen_at: seen_at, current_gestionnaire: gestionnaire }
|
||||
subject { render 'instructeurs/shared/avis/list.html.haml', avis: avis, avis_seen_at: seen_at, current_instructeur: instructeur }
|
||||
|
||||
let(:gestionnaire) { create(:gestionnaire) }
|
||||
let(:avis) { [create(:avis, claimant: gestionnaire)] }
|
||||
let(:instructeur) { create(:instructeur) }
|
||||
let(:avis) { [create(:avis, claimant: instructeur)] }
|
||||
let(:seen_at) { avis.first.created_at + 1.hour }
|
||||
|
||||
it { is_expected.to have_text(avis.first.introduction) }
|
||||
|
@ -19,7 +19,7 @@ describe 'gestionnaires/shared/avis/_list.html.haml', type: :view do
|
|||
end
|
||||
|
||||
context 'with an answer' do
|
||||
let(:avis) { [create(:avis, :with_answer, claimant: gestionnaire)] }
|
||||
let(:avis) { [create(:avis, :with_answer, claimant: instructeur)] }
|
||||
|
||||
it 'renders the answer formatted with newlines' do
|
||||
expect(subject).to include(simple_format(avis.first.answer))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue