fix(test): dossiers_controller_spec
This commit is contained in:
parent
7076d6d99e
commit
d8ee4cb360
1 changed files with 9 additions and 9 deletions
|
@ -154,7 +154,7 @@ describe Instructeurs::DossiersController, type: :controller do
|
|||
it { expect(dossier.reload.state).to eq(Dossier.states.fetch(:en_instruction)) }
|
||||
it { expect(instructeur.follow?(dossier)).to be true }
|
||||
it { expect(response).to have_http_status(:ok) }
|
||||
it { expect(response.body).to include('#header-top') }
|
||||
it { expect(response.body).to include('header-top') }
|
||||
|
||||
context 'when the dossier has already been put en_instruction' do
|
||||
let(:dossier) { create(:dossier, :en_instruction, procedure: procedure) }
|
||||
|
@ -200,7 +200,7 @@ describe Instructeurs::DossiersController, type: :controller do
|
|||
|
||||
it { expect(dossier.reload.state).to eq(Dossier.states.fetch(:en_construction)) }
|
||||
it { expect(response).to have_http_status(:ok) }
|
||||
it { expect(response.body).to include('#header-top') }
|
||||
it { expect(response.body).to include('header-top') }
|
||||
|
||||
context 'when the dossier has already been put en_construction' do
|
||||
let(:dossier) { create(:dossier, :en_construction, procedure: procedure) }
|
||||
|
@ -236,7 +236,7 @@ describe Instructeurs::DossiersController, type: :controller do
|
|||
context 'when the dossier is refuse' do
|
||||
it { expect(dossier.reload.state).to eq(Dossier.states.fetch(:en_instruction)) }
|
||||
it { expect(response).to have_http_status(:ok) }
|
||||
it { expect(response.body).to include('#header-top') }
|
||||
it { expect(response.body).to include('header-top') }
|
||||
end
|
||||
|
||||
context 'when the dossier has already been put en_instruction' do
|
||||
|
@ -313,7 +313,7 @@ describe Instructeurs::DossiersController, type: :controller do
|
|||
expect(dossier.justificatif_motivation).to be_attached
|
||||
end
|
||||
|
||||
it { expect(subject.body).to include('#header-top') }
|
||||
it { expect(subject.body).to include('header-top') }
|
||||
end
|
||||
|
||||
context 'with dossier in batch_operation' do
|
||||
|
@ -353,7 +353,7 @@ describe Instructeurs::DossiersController, type: :controller do
|
|||
subject
|
||||
end
|
||||
|
||||
it { expect(subject.body).to include('#header-top') }
|
||||
it { expect(subject.body).to include('header-top') }
|
||||
end
|
||||
|
||||
context 'with attachment' do
|
||||
|
@ -367,7 +367,7 @@ describe Instructeurs::DossiersController, type: :controller do
|
|||
expect(dossier.justificatif_motivation).to be_attached
|
||||
end
|
||||
|
||||
it { expect(subject.body).to include('#header-top') }
|
||||
it { expect(subject.body).to include('header-top') }
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -409,14 +409,14 @@ describe Instructeurs::DossiersController, type: :controller do
|
|||
end
|
||||
|
||||
it 'The instructeur is sent back to the dossier page' do
|
||||
expect(subject.body).to include('#header-top')
|
||||
expect(subject.body).to include('header-top')
|
||||
end
|
||||
|
||||
context 'and the dossier has already an attestation' do
|
||||
it 'should not crash' do
|
||||
dossier.attestation = Attestation.new
|
||||
dossier.save
|
||||
expect(subject.body).to include('#header-top')
|
||||
expect(subject.body).to include('header-top')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -455,7 +455,7 @@ describe Instructeurs::DossiersController, type: :controller do
|
|||
expect(dossier.justificatif_motivation).to be_attached
|
||||
end
|
||||
|
||||
it { expect(subject.body).to include('#header-top') }
|
||||
it { expect(subject.body).to include('header-top') }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue