users and institutions route, tests fixed
This commit is contained in:
@@ -140,10 +140,18 @@ class InstitutionLinkControllerTest extends TestCase
|
||||
$this->postJson("/api/institutions/{$institution->uuid}/links", $this->validPayload())->assertForbidden();
|
||||
}
|
||||
|
||||
public function test_guests_cannot_access_links(): void
|
||||
public function test_guests_can_read_links(): void
|
||||
{
|
||||
$institution = Institution::factory()->create();
|
||||
InstitutionLink::factory()->create(['institution_id' => $institution->id]);
|
||||
|
||||
$this->getJson("/api/institutions/{$institution->uuid}/links")->assertOk();
|
||||
}
|
||||
|
||||
public function test_guests_cannot_write_links(): void
|
||||
{
|
||||
$institution = Institution::factory()->create();
|
||||
|
||||
$this->getJson("/api/institutions/{$institution->uuid}/links")->assertUnauthorized();
|
||||
$this->postJson("/api/institutions/{$institution->uuid}/links", $this->validPayload())->assertUnauthorized();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user