Skip to content

Commit

Permalink
Merge pull request #2045 from jordan-brough/fix-flaky-stock-managemen…
Browse files Browse the repository at this point in the history
…t-spec

Fix flaky stock management spec
  • Loading branch information
jhawthorn authored Jun 28, 2017
2 parents 554cbfa + 5b9f51e commit 6d0cc1f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions backend/app/controllers/spree/admin/products_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ def collection
# @search needs to be defined as this is passed to search_form_for
@search = super.ransack(params[:q])
@collection = @search.result.
order(id: :asc).
includes(product_includes).
page(params[:page]).
per(Spree::Config[:admin_products_per_page])
Expand Down
2 changes: 0 additions & 2 deletions backend/spec/features/admin/products/stock_management_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
# It is OK to still render the stock page, ensure no errors in this case
context "with no stock location" do
before do
@product = create(:product, name: 'apache baseball cap', price: 10)
@product.variants.create!(sku: 'FOOBAR')
Spree::StockLocation.destroy_all
find_by_id('content-header').click_link('Products')
within_row(1) do
Expand Down

0 comments on commit 6d0cc1f

Please sign in to comment.