What: test_deprecated_trigger_route_works_for_authenticated_users asserts $response->assertJson(['deliveries_created' => 1]) but never verifies the underlying side effects — no assertDatabaseCount('deliveries', 1), assertDatabaseHas(...), or Bus::assertDispatched(SendWebhook::class).
Where: tests/Feature/DeprecatedWebhookTriggerAuthTest.php:28-43
Why it matters: The test only checks that the controller's JSON echoes back a count of 1 — if a future regression on the deprecated alias route (which CLAUDE.md documents as "unversioned routes remain as deprecated aliases") caused it to report a count without actually creating the Delivery row or dispatching SendWebhook, this test would still pass. The sibling WebhookPayloadSizeLimitTest correctly guards against exactly this class of gap on the versioned route by asserting assertDatabaseCount. A silent divergence between the deprecated and versioned trigger paths could ship undetected.
Suggested fix: Add $this->assertDatabaseCount('deliveries', 1); and/or Bus::fake(); ... Bus::assertDispatched(SendWebhook::class); alongside the existing JSON assertion, mirroring WebhookPayloadSizeLimitTest.
What:
test_deprecated_trigger_route_works_for_authenticated_usersasserts$response->assertJson(['deliveries_created' => 1])but never verifies the underlying side effects — noassertDatabaseCount('deliveries', 1),assertDatabaseHas(...), orBus::assertDispatched(SendWebhook::class).Where:
tests/Feature/DeprecatedWebhookTriggerAuthTest.php:28-43Why it matters: The test only checks that the controller's JSON echoes back a count of 1 — if a future regression on the deprecated alias route (which CLAUDE.md documents as "unversioned routes remain as deprecated aliases") caused it to report a count without actually creating the
Deliveryrow or dispatchingSendWebhook, this test would still pass. The siblingWebhookPayloadSizeLimitTestcorrectly guards against exactly this class of gap on the versioned route by assertingassertDatabaseCount. A silent divergence between the deprecated and versioned trigger paths could ship undetected.Suggested fix: Add
$this->assertDatabaseCount('deliveries', 1);and/orBus::fake(); ... Bus::assertDispatched(SendWebhook::class);alongside the existing JSON assertion, mirroringWebhookPayloadSizeLimitTest.