demarches-normaliennes/spec/views/backoffice/dossiers/en_attente_html.haml_spec.rb
Xavier J 37ea69ec51 Add pagination for gestionnaire dossier
Fix test for user pagination
2015-11-26 15:47:31 +01:00

21 lines
No EOL
887 B
Ruby

require 'spec_helper'
describe 'backoffice/dossiers/en_attente.html.haml', type: :view do
let(:administrateur) { create(:administrateur) }
let(:gestionnaire) { create(:gestionnaire, administrateur: administrateur) }
let!(:procedure) { create(:procedure, administrateur: administrateur) }
let!(:decorate_dossier) { create(:dossier, :with_user, procedure: procedure, state: 'replied').decorate }
before do
assign(:dossiers_en_attente, Dossier.en_attente(gestionnaire).paginate(:page => 1, :per_page => 12).decorate)
render
end
subject { rendered }
it { is_expected.to have_css('#backoffice_en_attente') }
it { is_expected.to have_content(procedure.libelle) }
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) }
end