Commit 7dff49be85658c997775144bb8ed3b6e31011c61

Authored by Rafael Manzo
1 parent 7ee5afd2

It should not display the New project link unless a user is logged in

app/views/projects/index.html.erb
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <h1>Projects</h1> 2 <h1>Projects</h1>
3 </div> 3 </div>
4 4
5 -<p><%= link_to 'New Project', new_project_path, class: 'btn btn-primary' %></p> 5 +<p><% if user_signed_in? %><%= link_to 'New Project', new_project_path, class: 'btn btn-primary' %><% end %></p>
6 6
7 <table class="table table-hover"> 7 <table class="table table-hover">
8 <thead> 8 <thead>
features/project/create.feature
@@ -6,9 +6,7 @@ Feature: Project Creation @@ -6,9 +6,7 @@ Feature: Project Creation
6 @kalibro_restart 6 @kalibro_restart
7 Scenario: Should not create project without login 7 Scenario: Should not create project without login
8 Given I am at the All Projects page 8 Given I am at the All Projects page
9 - When I click the New Project link  
10 - Then I should be in the Login page  
11 - And I should see "You need to sign in or sign up before continuing." 9 + Then I should not see New Project
12 10
13 @kalibro_restart 11 @kalibro_restart
14 Scenario: project creation 12 Scenario: project creation