Skip to content

Commit 055816d

Browse files
committed
Add test for invalid line points
1 parent d68fbc0 commit 055816d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/php/Http/Controllers/Api/VideoAnnotationControllerTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,15 @@ public function testStore()
263263
'points' => [[844.69, 1028.44, 844.69, 1028.44, 844.69, 1028.44, 844.69, 1028.44]],
264264
])->assertStatus(422);
265265

266+
// shape is invalid
267+
$this
268+
->json('POST', "/api/v1/videos/{$this->video->id}/annotations", [
269+
'shape_id' => Shape::lineId(),
270+
'label_id' => $label->id,
271+
'frames' => [1],
272+
'points' => [[844.69, 1028.44, 844.69, 1028.44, 844.69, 1028.44, 844.69, 1028.44]],
273+
])->assertStatus(422);
274+
266275
$this
267276
->postJson("/api/v1/videos/{$this->video->id}/annotations", [
268277
'shape_id' => Shape::pointId(),

0 commit comments

Comments
 (0)