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")