diff --git a/app/assets/javascripts/admin/orders/directives/customer_search_override.js.coffee b/app/assets/javascripts/admin/orders/directives/customer_search_override.js.coffee index b091342f96..6f36322d91 100644 --- a/app/assets/javascripts/admin/orders/directives/customer_search_override.js.coffee +++ b/app/assets/javascripts/admin/orders/directives/customer_search_override.js.coffee @@ -1,7 +1,6 @@ angular.module("admin.orders").directive 'customerSearchOverride', -> restrict: 'C' link: (scope, element, attr) -> - console.log('customerSearchOverride C') formatCustomerResult = (customer) -> customerTemplate customer: customer @@ -40,7 +39,6 @@ angular.module("admin.orders").directive 'customerSearchOverride', -> ] attribute_wrapper = '#order_' + address + '_attributes_' if data # modified - console.log('xiebing') _.each address_parts, (part) -> $(attribute_wrapper + part).val data[part] return diff --git a/spec/features/admin/orders_spec.rb b/spec/features/admin/orders_spec.rb index cf6670f157..cf1598f3fe 100644 --- a/spec/features/admin/orders_spec.rb +++ b/spec/features/admin/orders_spec.rb @@ -10,7 +10,7 @@ feature %q{ background do @user = create(:user) @product = create(:simple_product) - @distributor = create(:distributor_enterprise, charges_sales_tax: true) + @distributor = create(:distributor_enterprise, owner: @user, charges_sales_tax: true) @order_cycle = create(:simple_order_cycle, name: 'One', distributors: [@distributor], variants: [@product.variants.first]) @order = create(:order_with_totals_and_distribution, user: @user, distributor: @distributor, order_cycle: @order_cycle, state: 'complete', payment_state: 'balance_due') @@ -126,7 +126,9 @@ feature %q{ @order.save! # When I create a new order - login_to_admin_section + quick_login_as @user + visit spree.admin_path + visit '/admin/orders' click_link 'New Order' select2_select @distributor.name, from: 'order_distributor_id'