Skip to content

Commit

Permalink
fix broken steps and update statuses index page
Browse files Browse the repository at this point in the history
  • Loading branch information
djgraham committed Feb 1, 2012
1 parent 64bbbef commit da853ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/views/admin/statuses/index.html.erb
@@ -1,18 +1,20 @@
<h1>Statuses</h1>

<%= link_to new_admin_status_path, "Add new status" %>
<%= link_to "Add new status", new_admin_status_path %>
<% if @statuses.size > 1 %>
<table>
<thead>
<th>Status name</th>
<th>Colour code</th>
<th>Resolved?</th>
</thead>
<tbody>
<% @statuses.each do |status| %>
<tr>
<td><%= link_to status.name, edit_admin_status_path(status) %></td>
<td>#<%= status.colour %></td>
<td><%= status.resolved? ? "Y" : "N" %></td>
</tr>
<% end %>
</tbody>
Expand Down
3 changes: 3 additions & 0 deletions features/step_definitions/status_steps.rb
Expand Up @@ -12,6 +12,7 @@
end

When /^I click "([^"]*)"$/ do |arg1|
@status = Status.find_by_name arg1
visit "/admin/statuses/#{@status.id}/edit"
end

Expand All @@ -21,6 +22,7 @@
end

Then /^"([^"]*)" should have a resolved flag$/ do |arg1|
@status = Status.find_by_name arg1
@status.should be_resolved
end

Expand All @@ -30,6 +32,7 @@
end

Then /^"([^"]*)" should not have a resolved flag$/ do |arg1|
@status = Status.find_by_name arg1
@status.should_not be_resolved
end

0 comments on commit da853ba

Please sign in to comment.