summaryrefslogtreecommitdiff
path: root/spec/models/analytics/cycle_analytics/aggregation_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/analytics/cycle_analytics/aggregation_spec.rb')
-rw-r--r--spec/models/analytics/cycle_analytics/aggregation_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/models/analytics/cycle_analytics/aggregation_spec.rb b/spec/models/analytics/cycle_analytics/aggregation_spec.rb
index a51c21dc87e..e69093f454a 100644
--- a/spec/models/analytics/cycle_analytics/aggregation_spec.rb
+++ b/spec/models/analytics/cycle_analytics/aggregation_spec.rb
@@ -158,6 +158,16 @@ RSpec.describe Analytics::CycleAnalytics::Aggregation, type: :model, feature_cat
end.not_to change { described_class.count }
end
end
+
+ context 'when the aggregation was disabled for some reason' do
+ it 're-enables the aggregation' do
+ create(:cycle_analytics_aggregation, enabled: false, namespace: group)
+
+ aggregation = described_class.safe_create_for_namespace(group)
+
+ expect(aggregation).to be_enabled
+ end
+ end
end
describe '#load_batch' do