summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2017-01-12 18:02:11 +0000
committerDouwe Maan <douwe@gitlab.com>2017-01-12 18:02:11 +0000
commit6ebbecdd3c1a13bc88a15ed2509e67e6aae8b9eb (patch)
tree831e411de91220579e39b70d5b9560f515fff4ba /spec
parent6688d695ca0b1a2d04fe4e086804469732b4ae29 (diff)
parentc3a2d57415ec32d257c557bd24df8e6aab7fadae (diff)
downloadgitlab-ce-6ebbecdd3c1a13bc88a15ed2509e67e6aae8b9eb.tar.gz
Merge branch 'fill-authorized-projects' into 'master'
Fill missing authorized projects rows Closes #26194 See merge request !8476
Diffstat (limited to 'spec')
-rw-r--r--spec/migrations/fill_authorized_projects_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/migrations/fill_authorized_projects_spec.rb b/spec/migrations/fill_authorized_projects_spec.rb
new file mode 100644
index 00000000000..99dc4195818
--- /dev/null
+++ b/spec/migrations/fill_authorized_projects_spec.rb
@@ -0,0 +1,18 @@
+require 'spec_helper'
+require Rails.root.join('db', 'post_migrate', '20170106142508_fill_authorized_projects.rb')
+
+describe FillAuthorizedProjects do
+ describe '#up' do
+ it 'schedules the jobs in batches' do
+ user1 = create(:user)
+ user2 = create(:user)
+
+ expect(Sidekiq::Client).to receive(:push_bulk).with(
+ 'class' => 'AuthorizedProjectsWorker',
+ 'args' => [[user1.id], [user2.id]]
+ )
+
+ described_class.new.up
+ end
+ end
+end