Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Feature/Controller/RoomsTest.php
Show First 20 Lines • Show All 324 Lines • ▼ Show 20 Lines | public function testSkus(): void | ||||
// Room's wallet controller, not owner | // Room's wallet controller, not owner | ||||
$response = $this->actingAs($ned)->get("api/v4/rooms/{$room->id}/skus"); | $response = $this->actingAs($ned)->get("api/v4/rooms/{$room->id}/skus"); | ||||
$response->assertStatus(200); | $response->assertStatus(200); | ||||
$json = $response->json(); | $json = $response->json(); | ||||
$this->assertCount(1, $json); | $this->assertCount(1, $json); | ||||
$this->assertSame('room', $json[0]['title']); | $this->assertSkuElement('room', $json[0], [ | ||||
'prio' => 0, | |||||
'type' => 'room', | |||||
'handler' => 'Room', | |||||
'enabled' => true, | |||||
'readonly' => true, | |||||
]); | |||||
} | } | ||||
/** | /** | ||||
* Test creating a room (POST /api/v4/rooms) | * Test creating a room (POST /api/v4/rooms) | ||||
*/ | */ | ||||
public function testStore(): void | public function testStore(): void | ||||
{ | { | ||||
$john = $this->getTestUser('john@kolab.org'); | $john = $this->getTestUser('john@kolab.org'); | ||||
▲ Show 20 Lines • Show All 127 Lines • Show Last 20 Lines |