[#890] add link to dossier in list dossier
This commit is contained in:
parent
c1b71b1b54
commit
ba671534c3
2 changed files with 11 additions and 2 deletions
|
@ -6,5 +6,6 @@
|
||||||
%th Mise à jour
|
%th Mise à jour
|
||||||
- @dossiers.each do |dossier|
|
- @dossiers.each do |dossier|
|
||||||
%tr
|
%tr
|
||||||
%td= dossier.nom_projet
|
%td
|
||||||
|
= link_to(dossier.nom_projet, users_dossier_recapitulatif_path(dossier))
|
||||||
%td= dossier.last_update
|
%td= dossier.last_update
|
|
@ -3,7 +3,7 @@ require 'spec_helper'
|
||||||
feature 'user access to the list of his dossier' do
|
feature 'user access to the list of his dossier' do
|
||||||
|
|
||||||
let(:user) { create(:user) }
|
let(:user) { create(:user) }
|
||||||
let!(:dossier1) { create(:dossier, user: user, nom_projet: 'mon permier dossier') }
|
let!(:dossier1) { create(:dossier, :with_procedure, user: user, nom_projet: 'mon permier dossier') }
|
||||||
let!(:dossier2) { create(:dossier, :with_user, nom_projet: 'mon deuxième dossier') }
|
let!(:dossier2) { create(:dossier, :with_user, nom_projet: 'mon deuxième dossier') }
|
||||||
before do
|
before do
|
||||||
visit root_path
|
visit root_path
|
||||||
|
@ -15,4 +15,12 @@ feature 'user access to the list of his dossier' do
|
||||||
expect(page).to have_content(dossier1.nom_projet)
|
expect(page).to have_content(dossier1.nom_projet)
|
||||||
expect(page).not_to have_content(dossier2.nom_projet)
|
expect(page).not_to have_content(dossier2.nom_projet)
|
||||||
end
|
end
|
||||||
|
context 'when user clicks on a projet in list' do
|
||||||
|
before do
|
||||||
|
page.click_on dossier1.nom_projet
|
||||||
|
end
|
||||||
|
scenario 'user is redirected to dossier page' do
|
||||||
|
expect(page).to have_css('#recap_dossier')
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
Loading…
Reference in a new issue