Auto-provision Meet workspace for Sales Centre demo links.
Deploy Ladill Meet / deploy (push) Successful in 1m38s
Deploy Ladill Meet / deploy (push) Successful in 1m38s
Create rep user, organization, and branch on first demo room request so sales reps do not need to onboard in Meet first. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -530,6 +530,33 @@ class MeetWebTest extends TestCase
|
||||
->assertJsonPath('room.title', 'Ladill demo with Prospect');
|
||||
}
|
||||
|
||||
public function test_service_api_provisions_sales_centre_workspace_when_missing(): void
|
||||
{
|
||||
\Illuminate\Support\Facades\Http::fake();
|
||||
config(['meet.service_api_keys.sales_centre' => 'test-sales-centre-key']);
|
||||
|
||||
$this->postJson('/api/service/v1/rooms', [
|
||||
'owner_ref' => 'sales-rep-without-meet',
|
||||
'host_user_ref' => 'sales-rep-without-meet',
|
||||
'host_name' => 'Ama Sales',
|
||||
'host_email' => 'ama@sales.test',
|
||||
'title' => 'Ladill demo with Prospect',
|
||||
'type' => 'instant',
|
||||
'source' => ['app' => 'sales_centre', 'entity_type' => 'sales_lead', 'entity_id' => '99'],
|
||||
'invite_emails' => ['prospect@demo.test'],
|
||||
], ['Authorization' => 'Bearer test-sales-centre-key'])
|
||||
->assertCreated()
|
||||
->assertJsonPath('room.host_user_ref', 'sales-rep-without-meet');
|
||||
|
||||
$this->assertDatabaseHas('users', [
|
||||
'public_id' => 'sales-rep-without-meet',
|
||||
'email' => 'ama@sales.test',
|
||||
]);
|
||||
$this->assertDatabaseHas('meet_organizations', [
|
||||
'owner_ref' => 'sales-rep-without-meet',
|
||||
]);
|
||||
}
|
||||
|
||||
public function test_service_api_can_create_town_hall_room(): void
|
||||
{
|
||||
\Illuminate\Support\Facades\Http::fake();
|
||||
|
||||
Reference in New Issue
Block a user