+ $page = $this->entities->page();
+ $attachment = $this->createAttachmentForPage($page);
+
+ $resp = $this->putJson("{$this->baseEndpoint}/{$attachment->id}", [
+ 'link' => 'https://example.com/donkey',
+ ]);
+
+ $resp->assertStatus(200);
+ $this->assertDatabaseHas('attachments', [
+ 'id' => $attachment->id,
+ 'path' => 'https://example.com/donkey',
+ ]);
+ }
+
+ public function test_update_does_not_require_name()
+ {
+ $this->actingAsApiAdmin();
+ $page = $this->entities->page();