1
0
mirror of https://github.com/Kovah/LinkAce.git synced 2025-03-20 06:39:38 +01:00

Minor corrections for note api tests

This commit is contained in:
Kovah 2022-07-13 23:19:13 +02:00
parent e26417b9cf
commit 17d1cdaf82
No known key found for this signature in database
GPG Key ID: AAAA031BA9830D7B

View File

@ -55,15 +55,13 @@ class NoteApiTest extends ApiTestCase
'note' => null,
]);
$response->assertJsonValidationErrors([
'link_id' => 'The link id field is required.',
'note' => 'The note field is required.',
]);
$response->assertForbidden(); // A valid link cannot be determined, thus it's unauthorized
}
public function testUpdateRequest(): void
{
$this->createTestLinks();
Note::factory()->create(['link_id' => 1]);
Note::factory()->create(['link_id' => 2]); // Note for internal link of other user
Note::factory()->create(['link_id' => 3]); // Note for private link of other user