summaryrefslogtreecommitdiff
path: root/spec/migrations
diff options
context:
space:
mode:
authorMichael Kozono <mkozono@gmail.com>2017-11-20 16:27:24 -0800
committerMichael Kozono <mkozono@gmail.com>2017-12-01 15:26:41 -0800
commitedb5cac46c1cba1029fb3e67d4853027590584f6 (patch)
tree3f17ff04ba05aea3143a69abd78124417437b024 /spec/migrations
parent17ce21d74eab4d2973d372cb3f97258eb3b81de9 (diff)
downloadgitlab-ce-edb5cac46c1cba1029fb3e67d4853027590584f6.tar.gz
Use bulk inserts
Diffstat (limited to 'spec/migrations')
-rw-r--r--spec/migrations/track_untracked_uploads_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/migrations/track_untracked_uploads_spec.rb b/spec/migrations/track_untracked_uploads_spec.rb
index 11824bebb91..01bfe26744f 100644
--- a/spec/migrations/track_untracked_uploads_spec.rb
+++ b/spec/migrations/track_untracked_uploads_spec.rb
@@ -62,8 +62,8 @@ describe TrackUntrackedUploads, :migration, :sidekiq do
expect(appearance.reload.uploads.where("path like '%/header_logo/%'").first.attributes).to include(@appearance_header_logo_attributes)
expect(user2.reload.uploads.first.attributes).to include(@user2_avatar_attributes)
- expect(project2.reload.uploads.first.attributes).to include(@project2_avatar_attributes)
- expect(project2.uploads.last.attributes).to include(@project2_markdown_attributes)
+ expect(project2.reload.uploads.where(uploader: 'AvatarUploader').first.attributes).to include(@project2_avatar_attributes)
+ expect(project2.uploads.where(uploader: 'FileUploader').first.attributes).to include(@project2_markdown_attributes)
end
it 'ignores already-tracked uploads' do
@@ -71,8 +71,8 @@ describe TrackUntrackedUploads, :migration, :sidekiq do
expect(appearance.reload.uploads.where("path like '%/logo/%'").first.attributes).to include(@appearance_logo_attributes)
expect(user1.reload.uploads.first.attributes).to include(@user1_avatar_attributes)
- expect(project1.reload.uploads.first.attributes).to include(@project1_avatar_attributes)
- expect(project1.uploads.last.attributes).to include(@project1_markdown_attributes)
+ expect(project1.reload.uploads.where(uploader: 'AvatarUploader').first.attributes).to include(@project1_avatar_attributes)
+ expect(project1.uploads.where(uploader: 'FileUploader').first.attributes).to include(@project1_markdown_attributes)
end
it 'the temporary table untracked_files_for_uploads no longer exists' do