Merge branch 'main' into feature/prefill_repetible

This commit is contained in:
Damien Le Thiec 2023-02-16 17:08:30 +01:00
commit dce4c84f9a
60 changed files with 573 additions and 195 deletions

View file

@ -320,11 +320,22 @@ describe Administrateurs::GroupeInstructeursController, type: :controller do
end
context 'when there are many instructeurs' do
before { remove_instructeur(admin.instructeur) }
before do
allow(GroupeInstructeurMailer).to receive(:notify_removed_instructeur)
.and_return(double(deliver_later: true))
remove_instructeur(admin.instructeur)
end
it { expect(gi_1_1.instructeurs).to include(instructeur) }
it { expect(gi_1_1.reload.instructeurs.count).to eq(1) }
it { expect(response).to redirect_to(admin_procedure_groupe_instructeur_path(procedure, gi_1_1)) }
it "calls GroupeInstructeurMailer with the right groupe and instructeur" do
expect(GroupeInstructeurMailer).to have_received(:notify_removed_instructeur).with(
gi_1_1,
admin.instructeur,
admin.email
)
end
end
context 'when there is only one instructeur' do

View file

@ -792,7 +792,7 @@ describe Instructeurs::DossiersController, type: :controller do
champs_private_attributes: {
'0': {
id: champ_multiple_drop_down_list.id,
value: ['', 'un', 'deux']
value: ['', 'val1', 'val2']
},
'1': {
id: champ_datetime.id,
@ -813,7 +813,7 @@ describe Instructeurs::DossiersController, type: :controller do
end
it {
expect(champ_multiple_drop_down_list.value).to eq('["un", "deux"]')
expect(champ_multiple_drop_down_list.value).to eq('["val1", "val2"]')
expect(champ_linked_drop_down_list.primary_value).to eq('primary')
expect(champ_linked_drop_down_list.secondary_value).to eq('secondary')
expect(champ_datetime.value).to eq('2019-12-21T13:17:00+01:00')
@ -839,7 +839,7 @@ describe Instructeurs::DossiersController, type: :controller do
champs_public_attributes: {
'0': {
id: champ_multiple_drop_down_list.id,
value: ['', 'un', 'deux']
value: ['', 'val1', 'val2']
}
}
}

View file

@ -27,8 +27,7 @@ describe PasswordComplexityController, type: :controller do
it 'renders Javascript that updates the password complexity meter' do
subject
expect(response.body).to include('complexity-label')
expect(response.body).to include('complexity-bar')
expect(response.body).to include('Mot de passe vulnérable')
end
end
end