Rename gestionnaire in code to instructeur

This commit is contained in:
simon lehericey 2019-08-06 11:02:54 +02:00
parent 6902f84b85
commit 3fde2a6f70
175 changed files with 1162 additions and 1162 deletions

View file

@ -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") }

View file

@ -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)',

View file

@ -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

View file

@ -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