Commit f90d7d0a authored by Stan Hu's avatar Stan Hu

Fix migration in migrate_epic_notes_mentions_to_db_spec.rb

The spec for the migration assumed that the primary ID for notes started
at 1, but if another migration ran before it that would change the
sequence. We can fix this by hard-coding the IDs in the spec to start at
1.

Closes https://gitlab.com/gitlab-org/gitlab/issues/199297
parent b93d76ba
......@@ -16,9 +16,9 @@ describe MigrateEpicNotesMentionsToDb, :migration, :sidekiq do
namespaces.create!(id: 1, name: 'group1', path: 'group1', owner_id: 1)
epics.create!(id: 1, iid: 1, title: "title", title_html: 'title', description: 'epic description', group_id: 1, author_id: 1)
notes.create!(note: 'note1 for @root to check', noteable_id: 1, noteable_type: 'Epic')
notes.create!(note: 'note2 for @root to check', noteable_id: 1, noteable_type: 'Epic', system: true)
notes.create!(note: 'note3 for @root to check', noteable_id: 1, noteable_type: 'Epic')
notes.create!(note: 'note1 for @root to check', id: 1, noteable_id: 1, noteable_type: 'Epic')
notes.create!(note: 'note2 for @root to check', id: 2, noteable_id: 1, noteable_type: 'Epic', system: true)
notes.create!(note: 'note3 for @root to check', id: 3, noteable_id: 1, noteable_type: 'Epic')
end
it 'schedules epic mentions migrations' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment