Skip to content

Commit

Permalink
Update FeedGeneratorTest.php
Browse files Browse the repository at this point in the history
  • Loading branch information
kawax committed Nov 22, 2024
1 parent 20cc9f0 commit 9728511
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions tests/Feature/FeedGenerator/FeedGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function test_feed_http(): void
return ['feed' => [['post' => 'at://']]];
});

$response = $this->get(route('bluesky.feed.generator', ['feed' => 'at://did:/app.bsky.feed.generator/test']));
$response = $this->get(route('bluesky.feed.skeleton', ['feed' => 'at://did:/app.bsky.feed.generator/test']));

$response->assertSuccessful();
$response->assertJson(['feed' => [['post' => 'at://']]]);
Expand All @@ -34,8 +34,20 @@ public function test_feed_http_missing(): void
return ['feed' => [['post' => 'at://']]];
});

$response = $this->get(route('bluesky.feed.generator', ['feed' => 'at://did:/app.bsky.feed.generator/miss']));
$response = $this->get(route('bluesky.feed.skeleton', ['feed' => 'at://did:/app.bsky.feed.generator/miss']));

$response->assertNotFound();
}

public function test_feed_describe(): void
{
FeedGenerator::register('test', function (?int $limit, ?string $cursor): array {
return ['feed' => [['post' => 'at://']]];
});

$response = $this->get(route('bluesky.feed.describe'));

$response->assertSuccessful();
$response->assertJson(['did' => null, 'feeds' => ['at:///app.bsky.feed.generator/test']]);
}
}

0 comments on commit 9728511

Please sign in to comment.