2015-09-22 10:15:12 +02:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2015-11-13 15:23:21 +01:00
|
|
|
describe 'backoffice/dossiers/en_attente.html.haml', type: :view do
|
2015-11-10 11:58:56 +01:00
|
|
|
let(:administrateur) { create(:administrateur) }
|
|
|
|
let(:gestionnaire) { create(:gestionnaire, administrateur: administrateur) }
|
|
|
|
|
|
|
|
let!(:procedure) { create(:procedure, administrateur: administrateur) }
|
2015-11-13 15:23:21 +01:00
|
|
|
let!(:decorate_dossier) { create(:dossier, :with_user, procedure: procedure, state: 'replied').decorate }
|
2015-11-10 11:58:56 +01:00
|
|
|
|
2015-09-22 10:15:12 +02:00
|
|
|
before do
|
2015-11-10 11:58:56 +01:00
|
|
|
assign(:dossiers_en_attente, Dossier.en_attente(gestionnaire).decorate)
|
2015-09-22 10:15:12 +02:00
|
|
|
render
|
|
|
|
end
|
2015-11-10 11:58:56 +01:00
|
|
|
|
2015-09-22 11:56:14 +02:00
|
|
|
subject { rendered }
|
2015-11-13 15:23:21 +01:00
|
|
|
it { is_expected.to have_css('#backoffice_en_attente') }
|
2015-09-22 11:56:14 +02:00
|
|
|
it { is_expected.to have_content(procedure.libelle) }
|
2015-09-24 18:33:10 +02:00
|
|
|
it { is_expected.to have_content(decorate_dossier.nom_projet) }
|
|
|
|
it { is_expected.to have_content(decorate_dossier.state_fr) }
|
|
|
|
it { is_expected.to have_content(decorate_dossier.last_update) }
|
2015-09-22 10:15:12 +02:00
|
|
|
end
|