From 682c09f5164076eca362c3307b54081a795d0542 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Thu, 1 Nov 2012 10:05:39 +1100 Subject: [PATCH] Remove use of old Distributor model, fix before all not cleaning db --- app/views/spree/products/_add_to_cart.html.haml | 3 +-- spec/lib/open_food_web/group_buy_report_spec.rb | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/views/spree/products/_add_to_cart.html.haml b/app/views/spree/products/_add_to_cart.html.haml index 34796f83a3..e934cebe21 100644 --- a/app/views/spree/products/_add_to_cart.html.haml +++ b/app/views/spree/products/_add_to_cart.html.haml @@ -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) - diff --git a/spec/lib/open_food_web/group_buy_report_spec.rb b/spec/lib/open_food_web/group_buy_report_spec.rb index c77d774856..0dae0d3d47 100644 --- a/spec/lib/open_food_web/group_buy_report_spec.rb +++ b/spec/lib/open_food_web/group_buy_report_spec.rb @@ -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")