From 0314bc54dd41449aac06f55dd77181a6bba5ce37 Mon Sep 17 00:00:00 2001 From: Guillaume Lazzara Date: Tue, 7 Jun 2016 15:52:55 +0200 Subject: [PATCH] =?UTF-8?q?Add=20'mes=20proc=C3=A9dures'=20link=20in=20nav?= =?UTF-8?q?bar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_navbar.html.haml | 5 ++++- spec/views/layouts/_navbar_spec.rb | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/views/layouts/_navbar.html.haml b/app/views/layouts/_navbar.html.haml index 29abbf4ae..cdc617695 100644 --- a/app/views/layouts/_navbar.html.haml +++ b/app/views/layouts/_navbar.html.haml @@ -8,7 +8,10 @@ %span{ style: 'margin-left: 25px;' } %b Mes Dossiers - + -elsif administrateur_signed_in? + %span{ style: 'margin-left: 25px;' } + %b + Mes Procédures #sign_out -if gestionnaire_signed_in? = render partial: 'gestionnaires/login_banner' diff --git a/spec/views/layouts/_navbar_spec.rb b/spec/views/layouts/_navbar_spec.rb index a0c0ec6d0..3c3156d6d 100644 --- a/spec/views/layouts/_navbar_spec.rb +++ b/spec/views/layouts/_navbar_spec.rb @@ -17,6 +17,7 @@ describe 'layouts/_navbar.html.haml', type: :view do it { is_expected.to match(/href="\/gestionnaires\/sign_in">Accompagnateur/) } it { is_expected.to match(/href="\/administrateurs\/sign_in">Administrateur/) } it { is_expected.not_to match(/Mes Dossiers/) } + it { is_expected.not_to match(/Mes Procédures/) } it { is_expected.not_to match(/Se déconnecter/) } end @@ -33,6 +34,7 @@ describe 'layouts/_navbar.html.haml', type: :view do it { is_expected.not_to match(/href="\/gestionnaires\/sign_in">Accompagnateur/) } it { is_expected.not_to match(/href="\/administrateurs\/sign_in">Administrateur/) } it { is_expected.not_to match(/Mes Dossiers/) } + it { is_expected.to match(/Mes Procédures/) } it { is_expected.to match(/Se déconnecter/) } end @@ -48,6 +50,7 @@ describe 'layouts/_navbar.html.haml', type: :view do it { is_expected.not_to match(/href="\/users\/sign_in">Utilisateur/) } it { is_expected.not_to match(/href="\/gestionnaires\/sign_in">Accompagnateur/) } it { is_expected.not_to match(/href="\/administrateurs\/sign_in">Administrateur/) } + it { is_expected.not_to match(/Mes Procédures/) } it { is_expected.to match(/Mes Dossiers/) } it { is_expected.to match(/Se déconnecter/) } end