Remove use of old Distributor model, fix before all not cleaning db

This commit is contained in:
Rohan Mitchell
2012-11-01 10:05:39 +11:00
parent 34588e6141
commit 682c09f516
2 changed files with 2 additions and 3 deletions

View File

@@ -17,11 +17,10 @@
- order = current_order(false)
- if order.nil? || order.can_change_distributor?
%p Distributor
= select_tag "distributor_id", options_from_collection_for_select([Distributor.new]+@product.distributors, "id", "name", current_distributor.andand.id)
= select_tag "distributor_id", options_from_collection_for_select([Enterprise.new]+@product.distributors, "id", "name", current_distributor.andand.id)
- else
= hidden_field_tag "distributor_id", order.distributor.id
.distributor-fixed= "Your distributor for this order is #{order.distributor.name}"
%br/
= button_tag :class => 'large primary', :id => 'add-to-cart-button', :type => :submit do
= t(:add_to_cart)

View File

@@ -3,7 +3,7 @@ require 'spec_helper'
module OpenFoodWeb
describe GroupBuyReport do
before(:all) do
before(:each) do
@orders = []
bill_address = create(:address)
distributor_address = create(:address, :address1 => "distributor address", :city => 'The Shire', :zipcode => "1234")