debian-mirror-gitlab/spec/migrations/toggle_vsa_aggregations_enable_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
925 B
Ruby
Raw Normal View History

2022-07-16 23:28:13 +05:30
# frozen_string_literal: true
require 'spec_helper'
require_migration!
2023-03-04 22:38:38 +05:30
RSpec.describe ToggleVsaAggregationsEnable, :migration, feature_category: :value_stream_management do
2022-07-16 23:28:13 +05:30
let(:aggregations) { table(:analytics_cycle_analytics_aggregations) }
let(:groups) { table(:namespaces) }
let!(:group1) { groups.create!(name: 'aaa', path: 'aaa') }
let!(:group2) { groups.create!(name: 'aaa', path: 'aaa') }
let!(:group3) { groups.create!(name: 'aaa', path: 'aaa') }
let!(:aggregation1) { aggregations.create!(group_id: group1.id, enabled: false) }
let!(:aggregation2) { aggregations.create!(group_id: group2.id, enabled: true) }
let!(:aggregation3) { aggregations.create!(group_id: group3.id, enabled: false) }
it 'makes all aggregations enabled' do
migrate!
expect(aggregation1.reload).to be_enabled
expect(aggregation2.reload).to be_enabled
expect(aggregation3.reload).to be_enabled
end
end