diff --git a/app/services/reports/data_source.rb b/app/services/reports/data_source.rb index 0206551d8..3f9a8c5d1 100644 --- a/app/services/reports/data_source.rb +++ b/app/services/reports/data_source.rb @@ -37,7 +37,7 @@ class Reports::DataSource end def rollup_enabled_for_account?(account) - account.reporting_timezone.present? && account.feature_enabled?('reporting_events_rollup') + account.reporting_timezone.present? && account.feature_enabled?(:report_rollup) end def hourly_grouping?(group_by) diff --git a/spec/builders/v2/reports/timeseries/report_builder_spec.rb b/spec/builders/v2/reports/timeseries/report_builder_spec.rb index 29540a924..6d01aa5e9 100644 --- a/spec/builders/v2/reports/timeseries/report_builder_spec.rb +++ b/spec/builders/v2/reports/timeseries/report_builder_spec.rb @@ -291,7 +291,7 @@ describe V2::Reports::Timeseries::ReportBuilder do before do account.update!(reporting_timezone: 'Etc/UTC') - allow(account).to receive(:feature_enabled?).with('reporting_events_rollup').and_return(true) + allow(account).to receive(:feature_enabled?).with(:report_rollup).and_return(true) end it 'raises record not found to preserve raw path behavior' do @@ -391,7 +391,7 @@ describe V2::Reports::Timeseries::ReportBuilder do before do account.update!(reporting_timezone: 'Etc/UTC') - allow(account).to receive(:feature_enabled?).with('reporting_events_rollup').and_return(true) + allow(account).to receive(:feature_enabled?).with(:report_rollup).and_return(true) end it 'raises record not found to preserve raw path behavior' do @@ -423,7 +423,7 @@ describe V2::Reports::Timeseries::ReportBuilder do before do account.update!(reporting_timezone: 'Chennai') - allow(account).to receive(:feature_enabled?).with('reporting_events_rollup').and_return(true) + allow(account).to receive(:feature_enabled?).with(:report_rollup).and_return(true) create(:reporting_events_rollup, account: account, diff --git a/spec/lib/reporting_events_rollup_backfill_spec.rb b/spec/lib/reporting_events_rollup_backfill_spec.rb index 58128a305..1da00213b 100644 --- a/spec/lib/reporting_events_rollup_backfill_spec.rb +++ b/spec/lib/reporting_events_rollup_backfill_spec.rb @@ -47,7 +47,7 @@ describe ReportingEventsRollupBackfill do it 'enables the feature flag when the user confirms' do allow($stdin).to receive(:gets).and_return("y\n") - expect(account).to receive(:enable_features!).with('reporting_events_rollup') + expect(account).to receive(:enable_features!).with(:report_rollup) service.send(:prompt_enable_rollup_read_path, account) end @@ -61,7 +61,7 @@ describe ReportingEventsRollupBackfill do end it 'skips the prompt when the feature is already enabled' do - allow(account).to receive(:feature_enabled?).with(:reporting_events_rollup).and_return(true) + allow(account).to receive(:feature_enabled?).with(:report_rollup).and_return(true) expect($stdin).not_to receive(:gets)