7 class RobotsTest extends TestCase
9 public function test_robots_effected_by_public_status()
11 $this->get('/robots.txt')->assertSee("User-agent: *\nDisallow: /");
13 $this->setSettings(['app-public' => 'true']);
15 $resp = $this->get('/robots.txt');
16 $resp->assertSee("User-agent: *\nDisallow:");
17 $resp->assertDontSee('Disallow: /');
20 public function test_robots_effected_by_setting()
22 $this->get('/robots.txt')->assertSee("User-agent: *\nDisallow: /");
24 config()->set('app.allow_robots', true);
26 $resp = $this->get('/robots.txt');
27 $resp->assertSee("User-agent: *\nDisallow:");
28 $resp->assertDontSee('Disallow: /');
30 // Check config overrides app-public setting
31 config()->set('app.allow_robots', false);
32 $this->setSettings(['app-public' => 'true']);
33 $this->get('/robots.txt')->assertSee("User-agent: *\nDisallow: /");