fix specs
This commit is contained in:
parent
1cf3db5899
commit
18602e046a
2 changed files with 9 additions and 10 deletions
|
@ -96,15 +96,6 @@ describe PiecesJustificativesService do
|
|||
it { expect(subject).to be_empty }
|
||||
end
|
||||
|
||||
context 'with a motivation and procedure with accuse de lecture' do
|
||||
let(:dossier) { create :dossier, :accepte, :with_motivation, procedure: create(:procedure, :accuse_lecture) }
|
||||
|
||||
it 'still displays the motivation text for the instructeur and the correct dossier state' do
|
||||
expect(subject).to have_content(dossier.motivation)
|
||||
expect(rendered).to have_selector('.fr-badge', text: 'accepté', count: 1)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with an attestation' do
|
||||
let(:dossier) { create(:dossier, :with_attestation) }
|
||||
let!(:witness) { create(:dossier, :with_attestation) }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
describe 'shared/dossiers/_infos_generales', type: :view do
|
||||
let(:dossier) { create(:dossier, :en_construction) }
|
||||
subject { render }
|
||||
subject { render 'shared/dossiers/infos_generales', dossier: dossier, profile: 'instructeur' }
|
||||
before do
|
||||
sign_in(current_role.user)
|
||||
allow(view).to receive(:current_instructeur).and_return(current_role)
|
||||
|
@ -32,6 +32,14 @@ describe 'shared/dossiers/_infos_generales', type: :view do
|
|||
end
|
||||
end
|
||||
|
||||
context 'with a motivation and procedure with accuse de lecture' do
|
||||
let(:dossier) { create :dossier, :accepte, :with_justificatif, procedure: create(:procedure, :accuse_lecture) }
|
||||
|
||||
it 'still displays the motivation text for the instructeur' do
|
||||
expect(subject).to have_content(dossier.motivation)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with an attestation' do
|
||||
let(:dossier) { create :dossier, :accepte, :with_attestation }
|
||||
|
||||
|
|
Loading…
Reference in a new issue