Commit eac2f1430145e43279b20ea5de08b77b875e398f

Authored by Renan Fichberg
Committed by Rafael Manzo
1 parent 7dff49be

Acceptance test for show action

Missing a test due to repository's factory
Signed-off-by: Guilherme Rojas V. de Lima <guilhermehrojas@gmail.com>
app/views/projects/show.html.erb
... ... @@ -24,6 +24,12 @@
24 24 </thead>
25 25  
26 26 <tbody>
  27 + <% if @project_repositories.size == 0 %>
  28 + <tr>
  29 + <% col_number = project_owner?(@project.id) ? 4 : 3 %>
  30 + <td colspan="<%= col_number %>">There are no repositories yet!</td>
  31 + </tr>
  32 + <% end %>
27 33 <% @project_repositories.each do |repository| %>
28 34 <tr>
29 35 <td><%= repository.name %></td>
... ...
features/project/show.feature 0 → 100644
... ... @@ -0,0 +1,22 @@
  1 +Feature: Show Project
  2 + In order to know all the repositories of the given project and its contents
  3 + As a regular user
  4 + I should be able to see each of them
  5 +
  6 +@kalibro_restart
  7 +Scenario: Considering the project has no repositories
  8 + Given I have a sample project
  9 + When I am at the Sample Project page
  10 + Then I should see There are no repositories yet!
  11 +
  12 +@kalibro_restart @wip
  13 +Scenario: Considering the project has repositories
  14 + Given I have a sample project
  15 + When I am at the Sample Project page
  16 + Then I should not see There are no repositories yet!
  17 +
  18 +@kalibro_restart
  19 +Scenario: Checking project contents
  20 + Given I have a sample project
  21 + When I am at the Sample Project page
  22 + Then the sample project should be there
0 23 \ No newline at end of file
... ...