mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Set test transaction to before_all transaction (#22445)
So that after_commit hooks work correctly for pre-fabricated objects.
This commit is contained in:
parent
8b80132f88
commit
5e2edeb2f7
@ -149,7 +149,12 @@ module TestSetup
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
TestProf::BeforeAll.configure { |config| config.before(:begin) { TestSetup.test_setup } }
|
TestProf::BeforeAll.configure do |config|
|
||||||
|
config.after(:begin) do
|
||||||
|
TestSetup.test_setup
|
||||||
|
DB.test_transaction = ActiveRecord::Base.connection.current_transaction
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if ENV["PREFABRICATION"] == "0"
|
if ENV["PREFABRICATION"] == "0"
|
||||||
module Prefabrication
|
module Prefabrication
|
||||||
|
Loading…
Reference in New Issue
Block a user