summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-18 15:08:51 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-18 15:08:51 +0000
commit163a7046ac76eb4109184e82ce0af911633e6626 (patch)
tree9f22bb438db435d518e8f5520b309c6319ae0bd8 /spec/support
parent0637ba1e6e9024f35b2cbf561d9002ec17350bb3 (diff)
downloadgitlab-ce-163a7046ac76eb4109184e82ce0af911633e6626.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/shared_examples/lib/gitlab/background_migration/mentions_migration_shared_examples.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/support/shared_examples/lib/gitlab/background_migration/mentions_migration_shared_examples.rb b/spec/support/shared_examples/lib/gitlab/background_migration/mentions_migration_shared_examples.rb
index f90e1a1ebab..60c0ec45c71 100644
--- a/spec/support/shared_examples/lib/gitlab/background_migration/mentions_migration_shared_examples.rb
+++ b/spec/support/shared_examples/lib/gitlab/background_migration/mentions_migration_shared_examples.rb
@@ -26,16 +26,18 @@ shared_examples 'resource notes mentions migration' do |migration_class, resourc
note1.becomes(Note).save!
note2.becomes(Note).save!
note3.becomes(Note).save!
- # note4.becomes(Note).save(validate: false)
+ note4.becomes(Note).save!
+ note5.becomes(Note).save(validate: false)
end
it 'migrates mentions from note' do
join = migration_class::JOIN
conditions = migration_class::QUERY_CONDITIONS
- # there are 4 notes for each noteable_type, but one does not have mentions and
+ # there are 5 notes for each noteable_type, but two do not have mentions and
# another one's noteable_id points to an inexistent resource
- expect(notes.where(noteable_type: resource_class.to_s).count).to eq 4
+ expect(notes.where(noteable_type: resource_class.to_s).count).to eq 5
+ expect(user_mentions.count).to eq 0
expect do
subject.perform(resource_class.name, join, conditions, true, Note.minimum(:id), Note.maximum(:id))