debian-mirror-gitlab/spec/lib/after_commit_queue_spec.rb
2020-08-09 17:44:08 +05:30

17 lines
324 B
Ruby

# frozen_string_literal: true
require 'spec_helper'
RSpec.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