trove/tests/Feature/BotPageTest.php

40 lines
955 B
PHP
Raw Normal View History

<?php
declare(strict_types=1);
namespace Tests\Feature;
use Tests\TestCase;
class BotPageTest extends TestCase
{
public function test_bot_page_renders_at_public_route(): void
{
$response = $this->get('/bot');
$response->assertStatus(200);
}
public function test_bot_page_contains_user_agent_string(): void
{
$response = $this->get('/bot');
$response->assertSee('TroveBot/0.1 (+https://trove.lvl0.xyz/bot)', escape: false);
}
public function test_bot_page_contains_robots_txt_opt_out_example(): void
{
$response = $this->get('/bot');
$response->assertSee('User-agent: TroveBot', escape: false);
$response->assertSee('Disallow: /', escape: false);
}
public function test_bot_page_links_to_forge_repository(): void
{
$response = $this->get('/bot');
$response->assertSee('https://forge.lvl0.xyz/lvl0/trove', escape: false);
}
}