Revert "chore: Upgrade Rails to 7.2.2 and update Gemfile dependencies (#11037)"

This reverts commit ef6ba8aabd.
This commit is contained in:
Sojan Jose
2026-02-03 21:09:42 -08:00
parent ef6ba8aabd
commit 9eb3ee44a8
28 changed files with 311 additions and 360 deletions

View File

@@ -1,22 +1,15 @@
require 'rails_helper'
RSpec.describe V2::ReportBuilder do
describe V2::ReportBuilder do
include ActiveJob::TestHelper
self.use_transactional_tests = false
def truncate_test_data
connection = ActiveRecord::Base.connection
connection.truncate_tables(*connection.tables)
end
before { truncate_test_data }
let(:account) { create(:account) }
let!(:label_1) { create(:label, title: 'Label_1', account: account) }
let!(:label_2) { create(:label, title: 'Label_2', account: account) }
let_it_be(:account) { create(:account) }
let_it_be(:label_1) { create(:label, title: 'Label_1', account: account) }
let_it_be(:label_2) { create(:label, title: 'Label_2', account: account) }
describe '#timeseries' do
before do
# Use before_all to share expensive setup across all tests in this describe block
# This runs once instead of 21 times, dramatically speeding up the suite
before_all do
travel_to(Time.zone.today) do
user = create(:user, account: account)
inbox = create(:inbox, account: account)
@@ -28,7 +21,7 @@ RSpec.describe V2::ReportBuilder do
perform_enqueued_jobs do
10.times do
conversation = create(:conversation, account: account,
inbox: inbox,
inbox: inbox, assignee: user,
created_at: Time.zone.today)
create_list(:message, 5, message_type: 'outgoing',
account: account, inbox: inbox,
@@ -44,7 +37,7 @@ RSpec.describe V2::ReportBuilder do
5.times do
conversation = create(:conversation, account: account,
inbox: inbox,
inbox: inbox, assignee: user,
created_at: (Time.zone.today - 2.days))
create_list(:message, 3, message_type: 'outgoing',
account: account, inbox: inbox,