Merge pull request #6068 from arku/perf/coordinator-specs

Replace `create` with `build_stubbed` in coordinator model specs
This commit is contained in:
Luis Ramos
2020-09-24 18:46:45 +01:00
committed by GitHub

View File

@@ -5,7 +5,12 @@ require 'spec_helper'
module OrderManagement
module Stock
describe Coordinator do
let!(:order) { create(:order_with_line_items, distributor: create(:distributor_enterprise)) }
let!(:order) do
build_stubbed(
:order_with_line_items,
distributor: build_stubbed(:distributor_enterprise)
)
end
subject { Coordinator.new(order) }