debian-mirror-gitlab/spec/migrations/20220606082910_add_tmp_index_for_potentially_misassociated_vulnerability_occurrences_spec.rb
2023-06-20 00:43:36 +05:30

24 lines
629 B
Ruby

# frozen_string_literal: true
require "spec_helper"
require_migration!
RSpec.describe AddTmpIndexForPotentiallyMisassociatedVulnerabilityOccurrences,
feature_category: :vulnerability_management do
let(:async_index) { Gitlab::Database::AsyncIndexes::PostgresAsyncIndex }
let(:index_name) { described_class::INDEX_NAME }
it "schedules the index" do
reversible_migration do |migration|
migration.before -> do
expect(async_index.where(name: index_name).count).to be(0)
end
migration.after -> do
expect(async_index.where(name: index_name).count).to be(1)
end
end
end
end