make(); $form->whitelist = [ Auth::id(), ]; $response = $this->post(route('library.store'), $form->toArray()); $response->assertStatus(201); } public function test_library_update(): void { $library = Library::factory()->create(); $form = Library::factory()->make(); $response = $this->put(route('library.update', ['library' => $library->id]), $form->toArray()); $response->assertStatus(204); $newAsset = Library::find($library->id); $this->assertEquals($form->name, $newAsset->name); } public function test_library_show(): void { $library = Library::factory()->create(); $response = $this->get(route('library.show', ['library' => $library->id])); $response->assertStatus(200) ->assertJsonStructure([ 'data' => [ 'id', 'name', 'asset_id', 'project_id', 'acl', 'whitelist' ] ]); } }