From 163a7046ac76eb4109184e82ce0af911633e6626 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 18 Feb 2020 15:08:51 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- .../background_migration/mentions_migration_shared_examples.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'spec/support') 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)) -- cgit v1.2.1