chore - Simplify call-site tests now that RegisterDiscoveredPageAction is unit-tested

This commit is contained in:
myrmidex 2026-04-26 20:22:24 +02:00
parent 649aeb3627
commit 6c0e1fe12d
2 changed files with 0 additions and 10 deletions

View file

@ -4,7 +4,6 @@
namespace Tests\Feature;
use App\Enums\PageStatusEnum;
use App\Listeners\UrlDiscoveredListener;
use App\Models\Page;
use App\Models\PageLink;
@ -66,15 +65,10 @@ public function test_listener_creates_target_page_and_source_page_with_link(): v
// Target page
$targetPage = Page::where('url', 'https://example-blog.com/article')->first();
$this->assertNotNull($targetPage);
$this->assertSame(PageStatusEnum::Discovered, $targetPage->status);
$this->assertSame($instance->id, $targetPage->instance_id);
// Source page
$sourcePage = Page::where('url', 'https://mastodon.social/@alice/109876543210')->first();
$this->assertNotNull($sourcePage);
$this->assertSame(PageStatusEnum::Discovered, $sourcePage->status);
$this->assertSame($instance->id, $sourcePage->instance_id);
$this->assertNull($sourcePage->fetched_at);
// Edge
$link = PageLink::where('source_page_id', $sourcePage->id)
@ -115,8 +109,6 @@ public function test_listener_with_null_post_url_creates_only_target_page(): voi
$targetPage = Page::where('url', 'https://example-blog.com/article')->first();
$this->assertNotNull($targetPage);
$this->assertSame(PageStatusEnum::Discovered, $targetPage->status);
$this->assertSame($instance->id, $targetPage->instance_id);
}
// ---------------------------------------------------------------------------

View file

@ -41,8 +41,6 @@ public function test_valid_url_submission_creates_page_as_discovered(): void
$this->assertDatabaseHas('pages', [
'url' => 'https://example.com/interesting-post',
'status' => PageStatusEnum::Discovered,
'instance_id' => null,
]);
}