Skip to content

Commit

Permalink
cukes for admin/zones
Browse files Browse the repository at this point in the history
  • Loading branch information
Neeraj Singh authored and schof committed Jan 24, 2011
1 parent 0c1218a commit 2efccc6
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/app/views/admin/zones/index.html.erb
Expand Up @@ -11,7 +11,7 @@


<h1><%= t("zones") %></h1>
<table class="index">
<table class="index" id='listing_zones'>
<thead>
<tr>
<th><%= order @search, :by => :name, :as => t("name") %></th>
Expand All @@ -25,7 +25,7 @@
<td><%=zone.name %></td>
<td><%=zone.description %></td>
<td class="actions">
<%=link_to_edit zone %> &nbsp;
<%=link_to_edit zone %> &nbsp;
<%=link_to_delete zone %>
</td>
</tr>
Expand Down
7 changes: 7 additions & 0 deletions core/features/admin/configurations.feature
Expand Up @@ -18,3 +18,10 @@ Feature: Admin visiting configurations
When I follow "Tax Categories"
Then I should see "Listing Tax Categories"
Then I should see listing tax categories tabular attributes

When I follow "Configuration"
Given 2 zones exist
When I follow "Zones"
Then show me the page
Then I should see listing zones tabular attributes

11 changes: 11 additions & 0 deletions core/features/step_definitions/admin/configurations.rb
@@ -1,3 +1,14 @@
Then /^I should see listing zones tabular attributes$/ do
output = tableish('table#listing_zones tr', 'td,th')
data = output[0]
data[0].should match(/Name/)
data[1].should == "Description"

data = output[1]
data[0].should == Zone.limit(1).order('name asc').to_a.first.name
data[1].should == Zone.limit(1).order('name asc').to_a.first.description
end

Then /^I should see listing tax categories tabular attributes$/ do
output = tableish('table#listing_tax_categories tr', 'td,th')
data = output[0]
Expand Down

0 comments on commit 2efccc6

Please sign in to comment.