Some fixes after review
This commit is contained in:
parent
83945b3366
commit
91bd058106
2 changed files with 5 additions and 6 deletions
|
@ -14,8 +14,7 @@
|
||||||
%div.body
|
%div.body
|
||||||
- unless @facade.commentaires.empty?
|
- unless @facade.commentaires.empty?
|
||||||
%div.commentaires
|
%div.commentaires
|
||||||
- @facade.commentaires.object.sort.each do |commentaire|
|
= render partial: 'dossiers/commentaires/commentaire', collection: @facade.commentaires.object.sort
|
||||||
= render partial: 'dossiers/commentaires/commentaire', locals: {commentaire: commentaire}
|
|
||||||
.row
|
.row
|
||||||
.col-lg-12.col-md-12.col-sm-12.col-xs-12
|
.col-lg-12.col-md-12.col-sm-12.col-xs-12
|
||||||
%div.split-hr
|
%div.split-hr
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe Users::CommentairesController, type: :controller do
|
||||||
context 'création correct d\'un commentaire' do
|
context 'création correct d\'un commentaire' do
|
||||||
subject do
|
subject do
|
||||||
sign_in dossier.user
|
sign_in dossier.user
|
||||||
post :create, params: {dossier_id: dossier_id, texte_commentaire: texte_commentaire}
|
post :create, params: { dossier_id: dossier_id, texte_commentaire: texte_commentaire }
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'depuis la page récapitulatif' do
|
it 'depuis la page récapitulatif' do
|
||||||
|
@ -34,12 +34,12 @@ describe Users::CommentairesController, type: :controller do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when document is upload whith a commentaire', vcr: {cassette_name: 'controllers_sers_commentaires_controller_upload_doc'} do
|
context 'when document is upload whith a commentaire', vcr: { cassette_name: 'controllers_sers_commentaires_controller_upload_doc' } do
|
||||||
let(:document_upload) { Rack::Test::UploadedFile.new("./spec/support/files/piece_justificative_0.pdf", 'application/pdf') }
|
let(:document_upload) { Rack::Test::UploadedFile.new("./spec/support/files/piece_justificative_0.pdf", 'application/pdf') }
|
||||||
|
|
||||||
subject do
|
subject do
|
||||||
sign_in dossier.user
|
sign_in dossier.user
|
||||||
post :create, params: {dossier_id: dossier_id, texte_commentaire: texte_commentaire, piece_justificative: {content: document_upload}}
|
post :create, params: { dossier_id: dossier_id, texte_commentaire: texte_commentaire, piece_justificative: { content: document_upload } }
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'create a new piece justificative' do
|
it 'create a new piece justificative' do
|
||||||
|
@ -88,7 +88,7 @@ describe Users::CommentairesController, type: :controller do
|
||||||
sign_in dossier.user
|
sign_in dossier.user
|
||||||
dossier.replied!
|
dossier.replied!
|
||||||
|
|
||||||
post :create, params: {dossier_id: dossier_id, texte_commentaire: texte_commentaire}
|
post :create, params: { dossier_id: dossier_id, texte_commentaire: texte_commentaire }
|
||||||
dossier.reload
|
dossier.reload
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue