2015-09-22 10:15:12 +02:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe 'backoffice/index.html.haml', type: :view do
|
2015-09-22 11:56:14 +02:00
|
|
|
let!(:procedure) { create(:procedure) }
|
2015-09-24 11:17:17 +02:00
|
|
|
let!(:decorated_dossier) { create(:dossier, :with_user, procedure: procedure).decorate }
|
2015-09-22 10:15:12 +02:00
|
|
|
before do
|
2015-09-22 11:56:14 +02:00
|
|
|
assign(:dossiers, [decorated_dossier])
|
2015-09-24 18:12:08 +02:00
|
|
|
decorated_dossier.proposed!
|
2015-09-22 10:15:12 +02:00
|
|
|
render
|
|
|
|
end
|
2015-09-22 11:56:14 +02:00
|
|
|
subject { rendered }
|
|
|
|
it { is_expected.to have_css('#backoffice') }
|
|
|
|
it { is_expected.to have_content('Demande de subvention') }
|
|
|
|
it { is_expected.to have_content(procedure.libelle) }
|
|
|
|
it { is_expected.to have_content(decorated_dossier.nom_projet) }
|
2015-09-24 18:12:08 +02:00
|
|
|
it { is_expected.to have_content(decorated_dossier.state_fr) }
|
2015-09-22 11:56:14 +02:00
|
|
|
it { is_expected.to have_content(decorated_dossier.last_update) }
|
2015-09-22 10:15:12 +02:00
|
|
|
end
|