Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-01 18:07:45 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-01 18:07:45 +0300
commit1219a9dce91f4edbc135dfc08299b4122b4825a8 (patch)
treee7d12a55d75a2d56e60d9527bef3724e3578866d /spec/support/shared_examples/models
parent1a0d6dbdc2ac3047f4953a359ef27ba6e26074ae (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/shared_examples/models')
-rw-r--r--spec/support/shared_examples/models/mentionable_shared_examples.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/support/shared_examples/models/mentionable_shared_examples.rb b/spec/support/shared_examples/models/mentionable_shared_examples.rb
index b6b131338cc..ba6aa4e1d89 100644
--- a/spec/support/shared_examples/models/mentionable_shared_examples.rb
+++ b/spec/support/shared_examples/models/mentionable_shared_examples.rb
@@ -287,9 +287,9 @@ RSpec.shared_examples 'load mentions from DB' do |mentionable_type|
before do
user_mention = note.send(:model_user_mention)
mention_ids = {
- mentioned_users_ids: user_mention.mentioned_users_ids.to_a << User.maximum(:id).to_i.succ,
- mentioned_projects_ids: user_mention.mentioned_projects_ids.to_a << Project.maximum(:id).to_i.succ,
- mentioned_groups_ids: user_mention.mentioned_groups_ids.to_a << Group.maximum(:id).to_i.succ
+ mentioned_users_ids: user_mention.mentioned_users_ids.to_a << non_existing_record_id,
+ mentioned_projects_ids: user_mention.mentioned_projects_ids.to_a << non_existing_record_id,
+ mentioned_groups_ids: user_mention.mentioned_groups_ids.to_a << non_existing_record_id
}
user_mention.update(mention_ids)
end