Merge branch 'dev'

This commit is contained in:
Mathieu Magnin 2017-12-15 11:41:53 +01:00
commit 1330497742
41 changed files with 171 additions and 99 deletions

View file

@ -1,17 +1,28 @@
@import "colors"; @import "colors";
@import "constants"; @import "constants";
.accompagnateur-title { .page-title {
font-size: 30px; font-size: 30px;
font-weight: normal; font-weight: normal;
margin-top: 3 * $default-spacer; margin-top: 3 * $default-spacer;
margin-bottom: 3 * $default-spacer; margin-bottom: 3 * $default-spacer;
} }
.tab-title {
font-size: 18px;
font-weight: bold;
margin-bottom: $default-padding;
}
.tab-list,
.tab-paragraph {
margin-bottom: 2 * $default-padding;
}
.accompagnateur-header { .accompagnateur-header {
background-color: $light-grey; background-color: $light-grey;
padding-top: $default-padding; padding-top: $default-padding;
margin-bottom: 2 * $default-spacer; margin-bottom: 3 * $default-spacer;
border-bottom: 1px solid $border-grey; border-bottom: 1px solid $border-grey;
.container { .container {

View file

@ -3,12 +3,6 @@
@import "constants"; @import "constants";
.give-avis { .give-avis {
h1 {
font-size: 18px;
font-weight: bold;
margin-bottom: $default-padding;
}
.lock { .lock {
margin-right: $default-spacer; margin-right: $default-spacer;
} }
@ -39,12 +33,6 @@
} }
.ask-avis { .ask-avis {
h1 {
font-size: 18px;
font-weight: bold;
margin-bottom: $default-padding;
}
.avis-notice { .avis-notice {
font-size: 14px; font-size: 14px;
color: $grey; color: $grey;
@ -74,22 +62,16 @@
} }
.list-avis { .list-avis {
.title { .count {
font-size: 18px; display: inline-block;
font-weight: bold; width: 20px;
margin-bottom: $default-padding; height: 20px;
border-radius: 10px;
.count { border: 1px solid $grey;
display: inline-block; text-align: center;
width: 20px; font-size: 12px;
height: 20px; font-weight: normal;
border-radius: 10px; margin-left: 8px;
border: 1px solid $grey;
text-align: center;
font-size: 12px;
font-weight: normal;
margin-left: 8px;
}
} }
.one-avis { .one-avis {

View file

@ -7,13 +7,23 @@
max-height: 350px; max-height: 350px;
overflow-y: scroll; overflow-y: scroll;
border: 1px solid $border-grey; border: 1px solid $border-grey;
background: $light-grey;
padding: 2 * $default-spacer; padding: 2 * $default-spacer;
margin-bottom: $default-spacer; margin-bottom: $default-spacer;
border-radius: 4px;
> li { > li {
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
margin-bottom: 2 * $default-padding; margin-bottom: $default-padding;
padding: $default-padding;
background: #FFFFFF;
width: 80%;
border-radius: 3px;
&.from-me {
margin-left: auto;
}
} }
} }

View file

@ -0,0 +1,5 @@
module ChampHelper
def is_not_header_nor_explication?(champ)
!['header_section', 'explication'].include?(champ.type_champ)
end
end

View file

@ -0,0 +1,7 @@
module CommentaireHelper
def commentaire_is_from_me_class(commentaire, email)
if commentaire.email == email
"from-me"
end
end
end

View file

@ -128,17 +128,27 @@ class AttestationTemplate < ApplicationRecord
.select { |dossier_champ| dossier_champ.libelle == tag[:libelle] } .select { |dossier_champ| dossier_champ.libelle == tag[:libelle] }
.first .first
acc.gsub("--#{tag[:libelle]}--", champ.to_s) replace_tag(acc, tag, champ)
end end
end end
def replace_tags_with_values_from_data(text, tags, data) def replace_tags_with_values_from_data(text, tags, data)
if data.present? if data.present?
tags.inject(text) do |acc, tag| tags.inject(text) do |acc, tag|
acc.gsub("--#{tag[:libelle]}--", data.send(tag[:target].to_sym).to_s) replace_tag(acc, tag, data.send(tag[:target].to_sym))
end end
else else
text text
end end
end end
def replace_tag(text, tag, value)
libelle = Regexp.quote(tag[:libelle])
# allow any kind of space (non-breaking or other) in the tags libellé to match any kind of space in the template
# (the '\\ |' is there because plain ASCII spaces were escaped by preceding Regexp.quote)
libelle.gsub!(/\\ |[[:blank:]]/, "[[:blank:]]")
text.gsub(/--#{libelle}--/, value.to_s)
end
end end

View file

@ -1,6 +1,6 @@
- if avis.present? - if avis.present?
%section.list-avis %section.list-avis
%h1.title %h1.tab-title
Avis des invités Avis des invités
%span.count= avis.count %span.count= avis.count

View file

@ -9,5 +9,7 @@
= link_to 'Demande', avis_path(avis) = link_to 'Demande', avis_path(avis)
%li{ class: current_page?(instruction_avis_path(avis)) ? 'active' : nil } %li{ class: current_page?(instruction_avis_path(avis)) ? 'active' : nil }
= link_to 'Avis', instruction_avis_path(avis) = link_to 'Avis', instruction_avis_path(avis)
- if avis.answer == nil
%span.notifications{ 'aria-label': 'notifications' }
%li{ class: current_page?(messagerie_avis_path(avis)) ? 'active' : nil } %li{ class: current_page?(messagerie_avis_path(avis)) ? 'active' : nil }
= link_to 'Messagerie', messagerie_avis_path(avis) = link_to 'Messagerie', messagerie_avis_path(avis)

View file

@ -5,7 +5,7 @@
.accompagnateur-header .accompagnateur-header
.container.flex .container.flex
.width-100 .width-100
%h1 Avis %h1.tab-title Avis
%ul.tabs %ul.tabs
%li{ class: (@statut == NewGestionnaire::AvisController::A_DONNER_STATUS) ? 'active' : nil }> %li{ class: (@statut == NewGestionnaire::AvisController::A_DONNER_STATUS) ? 'active' : nil }>
= link_to(avis_index_path(statut: NewGestionnaire::AvisController::A_DONNER_STATUS)) do = link_to(avis_index_path(statut: NewGestionnaire::AvisController::A_DONNER_STATUS)) do

View file

@ -5,7 +5,7 @@
.container .container
%section.give-avis %section.give-avis
%h1 Donner votre avis %h1.tab-title Donner votre avis
%h2.claimant %h2.claimant
Demandeur : Demandeur :
%span.email= @avis.claimant.email %span.email= @avis.claimant.email
@ -22,7 +22,7 @@
= f.submit 'Envoyer votre avis', class: 'button send' = f.submit 'Envoyer votre avis', class: 'button send'
%section.ask-avis %section.ask-avis
%h1 Inviter une personne à donner son avis %h1.tab-title Inviter une personne à donner son avis
%p.avis-notice L'invité pourra consulter, donner un avis sur le dossier et contribuer au fil de messagerie, mais il ne pourra le modifier. %p.avis-notice L'invité pourra consulter, donner un avis sur le dossier et contribuer au fil de messagerie, mais il ne pourra le modifier.
= form_for Avis.new, url: avis_avis_path(@avis), html: { class: 'form' } do |f| = form_for Avis.new, url: avis_avis_path(@avis), html: { class: 'form' } do |f|

View file

@ -5,7 +5,7 @@
.messagerie.container .messagerie.container
%ul.messages-list %ul.messages-list
- @dossier.commentaires.each do |commentaire| - @dossier.commentaires.each do |commentaire|
%li %li{ class: commentaire_is_from_me_class(commentaire, current_gestionnaire.email) }
= render partial: "new_gestionnaire/shared/commentaires/commentaire", locals: { commentaire: commentaire, messagerie_seen_at: nil } = render partial: "new_gestionnaire/shared/commentaires/commentaire", locals: { commentaire: commentaire, messagerie_seen_at: nil }
= render partial: "new_gestionnaire/shared/commentaires/form", locals: { commentaire: @commentaire, form_url: commentaire_avis_path(@avis) } = render partial: "new_gestionnaire/shared/commentaires/form", locals: { commentaire: @commentaire, form_url: commentaire_avis_path(@avis) }

View file

@ -4,7 +4,7 @@
= render partial: 'header', locals: { avis: @avis, dossier: @dossier } = render partial: 'header', locals: { avis: @avis, dossier: @dossier }
.container .container
.accompagnateur-title Identité du demandeur .tab-title Identité du demandeur
.card .card
- if @dossier.entreprise.present? - if @dossier.entreprise.present?
= render partial: 'new_gestionnaire/dossiers/identite_entreprise', locals: { entreprise: @dossier.entreprise } = render partial: 'new_gestionnaire/dossiers/identite_entreprise', locals: { entreprise: @dossier.entreprise }
@ -12,18 +12,18 @@
- if @dossier.individual.present? - if @dossier.individual.present?
= render partial: 'new_gestionnaire/dossiers/identite_individual', locals: { individual: @dossier.individual } = render partial: 'new_gestionnaire/dossiers/identite_individual', locals: { individual: @dossier.individual }
.accompagnateur-title Formulaire .tab-title Formulaire
- champs = @dossier.ordered_champs.decorate - champs = @dossier.ordered_champs.decorate
- if champs.any? - if champs.any?
.card .card
= render partial: 'new_gestionnaire/dossiers/champs', locals: { champs: champs, dossier: @dossier, demande_seen_at: nil } = render partial: 'new_gestionnaire/dossiers/champs', locals: { champs: champs, dossier: @dossier, demande_seen_at: nil }
- if @dossier.procedure.use_api_carto - if @dossier.procedure.use_api_carto
.accompagnateur-title Cartographie .tab-title Cartographie
.card .card
= render partial: 'new_gestionnaire/dossiers/map', locals: { dossier: @dossier } = render partial: 'new_gestionnaire/dossiers/map', locals: { dossier: @dossier }
- if @dossier.procedure.cerfa_flag? || @dossier.types_de_piece_justificative.any? - if @dossier.procedure.cerfa_flag? || @dossier.types_de_piece_justificative.any?
.accompagnateur-title Pièces jointes .tab-title Pièces jointes
.card .card
= render partial: "new_gestionnaire/dossiers/pieces_jointes", locals: { dossier: @dossier, demande_seen_at: nil } = render partial: "new_gestionnaire/dossiers/pieces_jointes", locals: { dossier: @dossier, demande_seen_at: nil }

View file

@ -1,9 +1,10 @@
.accompagnateur-title= title .tab-title= title
- if emails_collection.present? - if emails_collection.present?
%ul %ul.tab-list
- emails_collection.each do |email| - emails_collection.each do |email|
%li %li
= email = email
- else - else
= blank %p.tab-paragraph
= blank

View file

@ -5,16 +5,14 @@
#dossier-annotations-privees.container #dossier-annotations-privees.container
- if @dossier.ordered_champs_private.present? - if @dossier.ordered_champs_private.present?
%section %section
%h1.private-annotations Annotations privées = form_for @dossier, url: annotations_dossier_path(@dossier.procedure, @dossier), html: { class: 'form' } do |f|
.card.featured = f.fields_for :champs_private, f.object.ordered_champs_private do |champ_form|
= form_for @dossier, url: annotations_dossier_path(@dossier.procedure, @dossier), html: { class: 'form' } do |f| - champ = champ_form.object
= f.fields_for :champs_private, f.object.ordered_champs_private do |champ_form| = render partial: "new_gestionnaire/dossiers/champs/champ",
- champ = champ_form.object locals: { champ: champ, form: champ_form, seen_at: @annotations_privees_seen_at }
= render partial: "new_gestionnaire/dossiers/champs/champ",
locals: { champ: champ, form: champ_form, seen_at: @annotations_privees_seen_at }
.send-wrapper .send-wrapper
= f.submit 'Sauvegarder', class: 'button send', data: { disable_with: "Envoi..." } = f.submit 'Sauvegarder', class: 'button send', data: { disable_with: "Envoi..." }
- else - else
%h2.empty-text Aucune annotation privée %h2.empty-text Aucune annotation privée

View file

@ -4,7 +4,7 @@
.container .container
%section.ask-avis %section.ask-avis
%h1 Inviter une personne à donner son avis %h1.tab-title Inviter une personne à donner son avis
%p.avis-notice L'invité pourra consulter, donner un avis sur le dossier et contribuer au fil de messagerie, mais il ne pourra le modifier. %p.avis-notice L'invité pourra consulter, donner un avis sur le dossier et contribuer au fil de messagerie, mais il ne pourra le modifier.
= form_for Avis.new, url: avis_dossier_path(@dossier.procedure, @dossier), html: { class: 'form' } do |f| = form_for Avis.new, url: avis_dossier_path(@dossier.procedure, @dossier), html: { class: 'form' } do |f|

View file

@ -1,5 +1,3 @@
= render partial: 'new_gestionnaire/dossiers/champs/champ_label', locals: { form: form, champ: champ, seen_at: seen_at }
= form.text_field :value, = form.text_field :value,
'data-address': 'true', 'data-address': 'true',
placeholder: champ.libelle, placeholder: champ.libelle,

View file

@ -1,3 +1,6 @@
.champ .champ
- if is_not_header_nor_explication?(champ)
= render partial: 'new_gestionnaire/dossiers/champs/champ_label', locals: { form: form, champ: champ, seen_at: seen_at }
= render partial: "new_gestionnaire/dossiers/champs/#{champ.type_champ}", = render partial: "new_gestionnaire/dossiers/champs/#{champ.type_champ}",
locals: { champ: champ, form: form, seen_at: seen_at } locals: { champ: champ, form: form }

View file

@ -1,5 +1,3 @@
= render partial: 'new_gestionnaire/dossiers/champs/champ_label', locals: { form: form, champ: champ, seen_at: seen_at }
= form.check_box :value, = form.check_box :value,
{ required: champ.mandatory }, { required: champ.mandatory },
'on', 'on',

View file

@ -1,5 +1,3 @@
= render partial: 'new_gestionnaire/dossiers/champs/champ_label', locals: { form: form, champ: champ, seen_at: seen_at }
.radios .radios
%label %label
= form.radio_button :value, 'M.' = form.radio_button :value, 'M.'

View file

@ -1,5 +1,3 @@
= render partial: 'new_gestionnaire/dossiers/champs/champ_label', locals: { form: form, champ: champ, seen_at: seen_at }
= form.date_field :value, = form.date_field :value,
value: champ.value, value: champ.value,
placeholder: 'JJ/MM/AAAA', placeholder: 'JJ/MM/AAAA',

View file

@ -1,5 +1,3 @@
= render partial: 'new_gestionnaire/dossiers/champs/champ_label', locals: { form: form, champ: champ, seen_at: seen_at }
- parsed_value = champ.value.present? ? DateTime.parse(champ.value) : DateTime.now - parsed_value = champ.value.present? ? DateTime.parse(champ.value) : DateTime.now
.datetime .datetime

View file

@ -1,5 +1,3 @@
= render partial: 'new_gestionnaire/dossiers/champs/champ_label', locals: { form: form, champ: champ, seen_at: seen_at }
= form.select :value, = form.select :value,
Champ.departements, Champ.departements,
required: champ.mandatory required: champ.mandatory

View file

@ -1,5 +1,3 @@
= render partial: 'new_gestionnaire/dossiers/champs/champ_label', locals: { form: form, champ: champ, seen_at: seen_at }
- dossier = Dossier.find_by(id: champ.value) - dossier = Dossier.find_by(id: champ.value)
- show_text_summary = dossier.present? - show_text_summary = dossier.present?
- show_warning = !show_text_summary && champ.value.present? - show_warning = !show_text_summary && champ.value.present?

View file

@ -1,5 +1,3 @@
= render partial: 'new_gestionnaire/dossiers/champs/champ_label', locals: { form: form, champ: champ, seen_at: seen_at }
- if champ.drop_down_list && champ.drop_down_list.options.any? - if champ.drop_down_list && champ.drop_down_list.options.any?
= form.select :value, = form.select :value,
champ.drop_down_list.options, champ.drop_down_list.options,

View file

@ -1,5 +1,3 @@
= render partial: 'new_gestionnaire/dossiers/champs/champ_label', locals: { form: form, champ: champ, seen_at: seen_at }
= form.email_field :value, = form.email_field :value,
placeholder: champ.libelle, placeholder: champ.libelle,
required: champ.mandatory required: champ.mandatory

View file

@ -1,5 +1,3 @@
= render partial: 'new_gestionnaire/dossiers/champs/champ_label', locals: { form: form, champ: champ, seen_at: seen_at }
= form.check_box :value, = form.check_box :value,
{ required: champ.mandatory }, { required: champ.mandatory },
'on', 'on',

View file

@ -1,5 +1,3 @@
= render partial: 'new_gestionnaire/dossiers/champs/champ_label', locals: { form: form, champ: champ, seen_at: seen_at }
- if champ.drop_down_list && champ.drop_down_list.options.any? - if champ.drop_down_list && champ.drop_down_list.options.any?
= form.select :value, = form.select :value,
champ.drop_down_list.options, champ.drop_down_list.options,

View file

@ -1,5 +1,3 @@
= render partial: 'new_gestionnaire/dossiers/champs/champ_label', locals: { form: form, champ: champ, seen_at: seen_at }
= form.number_field :value, = form.number_field :value,
placeholder: champ.libelle, placeholder: champ.libelle,
required: champ.mandatory required: champ.mandatory

View file

@ -1,5 +1,3 @@
= render partial: 'new_gestionnaire/dossiers/champs/champ_label', locals: { form: form, champ: champ, seen_at: seen_at }
= form.select :value, = form.select :value,
Champ.pays, Champ.pays,
required: champ.mandatory required: champ.mandatory

View file

@ -1,5 +1,3 @@
= render partial: 'new_gestionnaire/dossiers/champs/champ_label', locals: { form: form, champ: champ, seen_at: seen_at }
= form.phone_field :value, = form.phone_field :value,
placeholder: champ.libelle, placeholder: champ.libelle,
required: champ.mandatory required: champ.mandatory

View file

@ -1,5 +1,3 @@
= render partial: 'new_gestionnaire/dossiers/champs/champ_label', locals: { form: form, champ: champ, seen_at: seen_at }
= form.select :value, = form.select :value,
Champ.regions, Champ.regions,
required: champ.mandatory required: champ.mandatory

View file

@ -1,5 +1,3 @@
= render partial: 'new_gestionnaire/dossiers/champs/champ_label', locals: { form: form, champ: champ, seen_at: seen_at }
= form.text_field :value, = form.text_field :value,
placeholder: champ.libelle, placeholder: champ.libelle,
required: champ.mandatory required: champ.mandatory

View file

@ -1,5 +1,3 @@
= render partial: 'new_gestionnaire/dossiers/champs/champ_label', locals: { form: form, champ: champ, seen_at: seen_at }
~ form.text_area :value, ~ form.text_area :value,
row: 6, row: 6,
placeholder: champ.description, placeholder: champ.description,

View file

@ -1,5 +1,3 @@
= render partial: 'new_gestionnaire/dossiers/champs/champ_label', locals: { form: form, champ: champ, seen_at: seen_at }
.radios .radios
%label %label
= form.radio_button :value, true = form.radio_button :value, true

View file

@ -5,7 +5,7 @@
.messagerie.container .messagerie.container
%ul.messages-list %ul.messages-list
- @dossier.commentaires.each do |commentaire| - @dossier.commentaires.each do |commentaire|
%li %li{ class: commentaire_is_from_me_class(commentaire, current_gestionnaire.email) }
= render partial: "new_gestionnaire/shared/commentaires/commentaire", locals: { commentaire: commentaire, messagerie_seen_at: @messagerie_seen_at } = render partial: "new_gestionnaire/shared/commentaires/commentaire", locals: { commentaire: commentaire, messagerie_seen_at: @messagerie_seen_at }
= render partial: "new_gestionnaire/shared/commentaires/form", locals: { commentaire: @commentaire, form_url: commentaire_dossier_path(@dossier.procedure, @dossier) } = render partial: "new_gestionnaire/shared/commentaires/form", locals: { commentaire: @commentaire, form_url: commentaire_dossier_path(@dossier.procedure, @dossier) }

View file

@ -3,7 +3,7 @@
= render partial: "header", locals: { dossier: @dossier } = render partial: "header", locals: { dossier: @dossier }
.container .container
.accompagnateur-title Identité du demandeur .tab-title Identité du demandeur
.card .card
- if @dossier.entreprise.present? - if @dossier.entreprise.present?
= render partial: "identite_entreprise", locals: { entreprise: @dossier.entreprise } = render partial: "identite_entreprise", locals: { entreprise: @dossier.entreprise }
@ -11,18 +11,18 @@
- if @dossier.individual.present? - if @dossier.individual.present?
= render partial: "identite_individual", locals: { individual: @dossier.individual } = render partial: "identite_individual", locals: { individual: @dossier.individual }
.accompagnateur-title Formulaire .tab-title Formulaire
- champs = @dossier.ordered_champs.includes(:type_de_champ).decorate - champs = @dossier.ordered_champs.includes(:type_de_champ).decorate
- if champs.any? - if champs.any?
.card .card
= render partial: "champs", locals: { champs: champs, dossier: @dossier, demande_seen_at: @demande_seen_at } = render partial: "champs", locals: { champs: champs, dossier: @dossier, demande_seen_at: @demande_seen_at }
- if @dossier.procedure.use_api_carto - if @dossier.procedure.use_api_carto
.accompagnateur-title Cartographie .tab-title Cartographie
.card .card
= render partial: "map", locals: { dossier: @dossier } = render partial: "map", locals: { dossier: @dossier }
- if @dossier.procedure.cerfa_flag? || @dossier.types_de_piece_justificative.any? - if @dossier.procedure.cerfa_flag? || @dossier.types_de_piece_justificative.any?
.accompagnateur-title Pièces jointes .tab-title Pièces jointes
.card .card
= render partial: "pieces_jointes", locals: { dossier: @dossier, demande_seen_at: @demande_seen_at } = render partial: "pieces_jointes", locals: { dossier: @dossier, demande_seen_at: @demande_seen_at }

View file

@ -1,7 +1,7 @@
- content_for(:title, "Procédures") - content_for(:title, "Procédures")
.container .container
%h1.accompagnateur-title Procédures %h1.page-title Procédures
%ul.procedure-list %ul.procedure-list
- @procedures.each do |p| - @procedures.each do |p|

View file

@ -1,7 +1,7 @@
- content_for(:title, "Recherche : #{@search_terms}") - content_for(:title, "Recherche : #{@search_terms}")
.container .container
.accompagnateur-title .page-title
Résultat de la recherche : Résultat de la recherche :
= pluralize(@dossiers.count, "dossier trouvé", "dossiers trouvés") = pluralize(@dossiers.count, "dossier trouvé", "dossiers trouvés")

View file

@ -0,0 +1,21 @@
require 'rails_helper'
RSpec.describe CommentaireHelper, type: :helper do
describe ".commentaire_is_from_me_class" do
let(:commentaire) { create(:commentaire, email: "michel@pref.fr") }
subject { commentaire_is_from_me_class(commentaire, me) }
context "when commentaire is from me" do
let(:me) { "michel@pref.fr" }
it { is_expected.to eq("from-me") }
end
context "when commentaire is not from me" do
let(:me) { "roger@usager.fr" }
it { is_expected.to eq nil }
end
end
end

View file

@ -283,5 +283,45 @@ describe AttestationTemplate, type: :model do
end end
end end
end end
context "match breaking and non breaking spaces" do
before do
c = dossier.champs.first
c.value = 'valeur'
c.save
end
context "when the tag contains a non breaking space" do
let(:template_body) { 'body --mon tag--' }
context 'and the champ contains the non breaking space' do
let(:types_de_champ) { [create(:type_de_champ_public, libelle: 'mon tag')] }
it { expect(view_args[:body]).to eq('body valeur') }
end
context 'and the champ has an ordinary space' do
let(:types_de_champ) { [create(:type_de_champ_public, libelle: 'mon tag')] }
it { expect(view_args[:body]).to eq('body valeur') }
end
end
context "when the tag contains an ordinay space" do
let(:template_body) { 'body --mon tag--' }
context 'and the champ contains a non breaking space' do
let(:types_de_champ) { [create(:type_de_champ_public, libelle: 'mon tag')] }
it { expect(view_args[:body]).to eq('body valeur') }
end
context 'and the champ has an ordinary space' do
let(:types_de_champ) { [create(:type_de_champ_public, libelle: 'mon tag')] }
it { expect(view_args[:body]).to eq('body valeur') }
end
end
end
end end
end end

View file

@ -0,0 +1,18 @@
describe 'new_gestionnaire/dossiers/print.html.haml', type: :view do
before { view.extend DossierHelper }
context "with a dossier" do
let(:current_gestionnaire) { create(:gestionnaire) }
let(:dossier) { create(:dossier, :received) }
before do
assign(:dossier, dossier)
view.stub(:current_gestionnaire).and_return(current_gestionnaire)
render
end
it { expect(rendered).to include("Dossier nº #{dossier.id}") }
it { expect(rendered).to include(dossier.procedure.libelle) }
end
end