mirror of
https://github.com/lingble/chatwoot.git
synced 2025-10-30 10:42:38 +00:00
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>
13 lines
328 B
Ruby
13 lines
328 B
Ruby
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
|