Remove activity stream functionality from controllers and providers.

- Remove activity stream related code and files
- Update configuration for HtmlSanitizer and RetryGuzzle
- Add `paginate` macro for `Collection`
- Remove unused code for `Codebird`
- Simplify `FrontPageController` and `NotesController` methods
This commit is contained in:
Jonny Barnes 2023-05-12 15:30:05 +01:00
parent e105887e3f
commit 86ac67698e
Signed by: jonny
SSH key fingerprint: SHA256:CTuSlns5U7qlD9jqHvtnVmfYV3Zwl2Z7WnJ4/dqOaL8
5 changed files with 0 additions and 136 deletions

View file

@ -1,60 +0,0 @@
<?php
declare(strict_types=1);
namespace Tests\Feature;
use App\Models\Note;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class ActivityStreamTest extends TestCase
{
use RefreshDatabase;
/** @test */
public function homepageRequestReturnsDataForSiteOwner(): void
{
$response = $this->get('/', ['Accept' => 'application/activity+json']);
$response->assertHeader('Content-Type', 'application/activity+json');
$response->assertJson([
'@context' => 'https://www.w3.org/ns/activitystreams',
'id' => config('app.url'),
'type' => 'Person',
'name' => config('user.displayname'),
]);
}
/** @test */
public function notesPageContainsAuthorActivityStreamData(): void
{
$response = $this->get('/notes', ['Accept' => 'application/activity+json']);
$response->assertHeader('Content-Type', 'application/activity+json');
$response->assertJson([
'@context' => 'https://www.w3.org/ns/activitystreams',
'id' => config('app.url'),
'type' => 'Person',
'name' => config('user.displayname'),
]);
}
/** @test */
public function requestForNoteIncludesActivityStreamData(): void
{
$note = Note::factory()->create();
$response = $this->get($note->longurl, ['Accept' => 'application/activity+json']);
$response->assertHeader('Content-Type', 'application/activity+json');
$response->assertJson([
'@context' => 'https://www.w3.org/ns/activitystreams',
'type' => 'Add',
'actor' => [
'type' => 'Person',
'id' => config('app.url'),
],
'object' => [
'type' => 'Note',
'name' => strip_tags($note->note),
],
]);
}
}