summaryrefslogtreecommitdiff
path: root/spec/workers
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-01 21:07:56 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-01 21:07:56 +0000
commit0e68afab211a172b862a7acc774e1eda5da8e471 (patch)
tree1eba04a16582c9183d4f479f82dd8709ae40d72f /spec/workers
parent33aa02e7a38d8dfc5e470dd5d776c8d4ce5b2dd5 (diff)
downloadgitlab-ce-0e68afab211a172b862a7acc774e1eda5da8e471.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/workers')
-rw-r--r--spec/workers/reactive_caching_worker_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/workers/reactive_caching_worker_spec.rb b/spec/workers/reactive_caching_worker_spec.rb
index c39a97b4eee..603ce6160ce 100644
--- a/spec/workers/reactive_caching_worker_spec.rb
+++ b/spec/workers/reactive_caching_worker_spec.rb
@@ -37,5 +37,13 @@ describe ReactiveCachingWorker do
expect(scheduled_job).to include('meta.related_class' => 'Environment')
end
+
+ it 'sets the related class on the job when it was passed as a class' do
+ described_class.perform_async(Project, 1, 'other', 'argument')
+
+ scheduled_job = described_class.jobs.first
+
+ expect(scheduled_job).to include('meta.related_class' => 'Project')
+ end
end
end