diff options
Diffstat (limited to 'spec/migrations/20230502120021_schedule_index_to_project_authorizations_on_project_user_access_level_spec.rb')
-rw-r--r-- | spec/migrations/20230502120021_schedule_index_to_project_authorizations_on_project_user_access_level_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/migrations/20230502120021_schedule_index_to_project_authorizations_on_project_user_access_level_spec.rb b/spec/migrations/20230502120021_schedule_index_to_project_authorizations_on_project_user_access_level_spec.rb new file mode 100644 index 00000000000..9759fa7862d --- /dev/null +++ b/spec/migrations/20230502120021_schedule_index_to_project_authorizations_on_project_user_access_level_spec.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +require "spec_helper" + +require_migration! + +RSpec.describe ScheduleIndexToProjectAuthorizationsOnProjectUserAccessLevel, feature_category: :security_policy_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 |