summaryrefslogtreecommitdiff
path: root/spec/lib/after_commit_queue_spec.rb
blob: ca383808bfc77c46ca1b850ef0a2a5330f62c3dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# 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