Add smoke test for reports, fix use of old Distributor model

This commit is contained in:
Rohan Mitchell
2012-11-01 10:20:06 +11:00
parent 78bdbcbe6f
commit d89945bbb2
3 changed files with 29 additions and 2 deletions

View File

@@ -53,7 +53,7 @@ Spree::Admin::ReportsController.class_eval do
@search = Spree::Order.complete.search(params[:q])
orders = @search.result
@distributors = Distributor.all
@distributors = Enterprise.is_distributor
@report = OpenFoodWeb::GroupBuyReport.new orders
unless params[:csv]

View File

@@ -1,7 +1,7 @@
require "spec_helper"
feature %q{
As an administration
As an administrator
I want manage enterprises
} do
include AuthenticationWorkflow

View File

@@ -0,0 +1,27 @@
require "spec_helper"
feature %q{
As an administrator
I want numbers, all the numbers!
} do
include AuthenticationWorkflow
include WebHelper
scenario "orders and distributors report" do
login_to_admin_section
click_link 'Reports'
click_link 'Orders And Distributors'
page.should have_content 'Order date'
end
scenario "group buys report" do
login_to_admin_section
click_link 'Reports'
click_link 'Group Buys'
page.should have_content 'Supplier'
end
end