Use new syndication target model when processing MicroPub requests

This commit is contained in:
Jonny Barnes 2022-10-23 20:38:12 +01:00
parent 976929e9b9
commit 66257e7e9b
Signed by: jonny
SSH key fingerprint: SHA256:CTuSlns5U7qlD9jqHvtnVmfYV3Zwl2Z7WnJ4/dqOaL8
6 changed files with 61 additions and 52 deletions

View file

@ -126,6 +126,12 @@ class MicropubControllerTest extends TestCase
public function micropubClientCanRequestTheNewNoteIsSyndicatedToTwitter(): void
{
Queue::fake();
SyndicationTarget::factory()->create([
'uid' => 'https://twitter.com/jonnybarnes',
'service_name' => 'Twitter',
]);
$faker = Factory::create();
$note = $faker->text;
$response = $this->post(
@ -233,6 +239,11 @@ class MicropubControllerTest extends TestCase
'path' => 'test-photo.jpg',
'type' => 'image',
]);
SyndicationTarget::factory()->create([
'uid' => 'https://twitter.com/jonnybarnes',
'service_name' => 'Twitter',
]);
$faker = Factory::create();
$note = $faker->text;
$response = $this->postJson(