Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Botelho <tiagonbotelho@hotmail.com>2017-08-17 12:00:31 +0300
committerTiago Botelho <tiagonbotelho@hotmail.com>2017-08-17 15:38:05 +0300
commitf865b1b459b7c53eb57580246d8e20c4fd45f7fe (patch)
treeb2a6c92cbc4187ca2ed86859ad280990b2525019 /spec/lib/after_commit_queue_spec.rb
parent4a2a6d521a260981482ee8e4931ebf06cb4f5b6a (diff)
Backports EE mirror stuck handling feature (https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2628) to CE
Diffstat (limited to 'spec/lib/after_commit_queue_spec.rb')
-rw-r--r--spec/lib/after_commit_queue_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/lib/after_commit_queue_spec.rb b/spec/lib/after_commit_queue_spec.rb
new file mode 100644
index 00000000000..6e7c2ec2363
--- /dev/null
+++ b/spec/lib/after_commit_queue_spec.rb
@@ -0,0 +1,15 @@
+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