Commit 142bb785 authored by Dylan Griffith's avatar Dylan Griffith

Add more note types to permission migration spec

This provides greater confidence that the migration will finish for all
note types. Also for clarity the lines are now sorted and
let_it_be(:project) was moved out of the loop block.
parent 91998943
......@@ -91,27 +91,35 @@ RSpec.describe AddPermissionsDataToNotesDocuments, :elastic, :sidekiq_inline do
describe '#completed?' do
using RSpec::Parameterized::TableSyntax
let_it_be(:project) { create(:project, :repository) }
subject { migration.completed? }
where(:note_type) do
%i{
note_on_issue
note_on_project_snippet
note_on_merge_request
note_on_commit
diff_note_on_merge_request
diff_note_on_commit
legacy_diff_note_on_merge_request
legacy_diff_note_on_commit
discussion_note_on_merge_request
diff_note_on_design
diff_note_on_merge_request
discussion_note_on_commit
discussion_note_on_issue
discussion_note_on_merge_request
discussion_note_on_personal_snippet
discussion_note_on_project_snippet
discussion_note_on_commit
discussion_note_on_vulnerability
legacy_diff_note_on_commit
legacy_diff_note_on_merge_request
note_on_alert
note_on_commit
note_on_design
note_on_epic
note_on_issue
note_on_merge_request
note_on_personal_snippet
note_on_project_snippet
note_on_vulnerability
}
end
with_them do
let_it_be(:project) { create(:project, :repository) }
let!(:note) { create(note_type, project: project) } # rubocop:disable Rails/SaveBang
before 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