2019-07-25 01:21:37 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-08-17 05:00:31 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe AfterCommitQueue do
|
|
|
|
it 'runs after transaction is committed' do
|
|
|
|
called = false
|
|
|
|
test_proc = proc { called = true }
|
|
|
|
|
|
|
|
project = build(:project)
|
|
|
|
project.run_after_commit(&test_proc)
|
|
|
|
|
|
|
|
project.save
|
|
|
|
|
|
|
|
expect(called).to be true
|
|
|
|
end
|
|
|
|
end
|