Commit 7dff49be85658c997775144bb8ed3b6e31011c61
1 parent
7ee5afd2
Exists in
colab
and in
4 other branches
It should not display the New project link unless a user is logged in
Showing
2 changed files
with
2 additions
and
4 deletions
Show diff stats
app/views/projects/index.html.erb
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | <h1>Projects</h1> |
3 | 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 | 7 | <table class="table table-hover"> |
8 | 8 | <thead> | ... | ... |
features/project/create.feature
... | ... | @@ -6,9 +6,7 @@ Feature: Project Creation |
6 | 6 | @kalibro_restart |
7 | 7 | Scenario: Should not create project without login |
8 | 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 | 11 | @kalibro_restart |
14 | 12 | Scenario: project creation | ... | ... |