chore: Generate test data for bulk insertion (#11229)

Co-authored-by: Vishnu Narayanan <vishnu@chatwoot.com>
Co-authored-by: Sojan <sojan@pepalo.com>
Co-authored-by: tds-1 <tanmay@qoala.id>
Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
This commit is contained in:
Tanmay Deep Sharma
2025-05-06 12:43:11 +07:00
committed by GitHub
parent cbdbf7900e
commit 6e6912aa56
10 changed files with 557 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
class TestData::InboxCreator
def self.create_for(account)
Array.new(TestData::Constants::INBOXES_PER_ACCOUNT) do
channel = Channel::Api.create!(account: account)
Inbox.create!(
account_id: account.id,
name: "API Inbox #{SecureRandom.hex(4)}",
channel: channel
)
end
end
end