From 255b20c91fc32d5c0de0edad1c2b471720534e11 Mon Sep 17 00:00:00 2001 From: nikhil trivedi Date: Mon, 21 Aug 2023 14:01:51 -0500 Subject: [PATCH] Clean up unit tests [WEB-2646] --- tests/Feature/HomePageTest.php | 5 ++--- tests/Feature/RobotsTxtTest.php | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Feature/HomePageTest.php b/tests/Feature/HomePageTest.php index e166891fd..dd12f6e4a 100644 --- a/tests/Feature/HomePageTest.php +++ b/tests/Feature/HomePageTest.php @@ -21,12 +21,11 @@ public function test_home_page_loads() public function test_visit_page_links_appear_on_home_page() { - $appUrl = config('APP_URL'); $response = $this->get(route('home')); $response->assertSee('Hours and admission fees'); - $response->assertSee("href=\"{$appUrl}/visit#hours\"", false); + $response->assertSee("href=\"/visit#hours\"", false); $response->assertSee('Directions and parking'); - $response->assertSee("href=\"{$appUrl}/visit#directions\"", false); + $response->assertSee("href=\"/visit#directions\"", false); } public function test_events_section_appears_on_home_page() diff --git a/tests/Feature/RobotsTxtTest.php b/tests/Feature/RobotsTxtTest.php index cef71b864..e32e6d3d9 100644 --- a/tests/Feature/RobotsTxtTest.php +++ b/tests/Feature/RobotsTxtTest.php @@ -33,6 +33,7 @@ public function test_allow_traffic_when_production_request_to_same_host() { Config::set('app.env', 'production'); Config::set('app.debug', false); + Config::set('app.url', 'www-dev.artic.edu'); $response = $this->get(route('robots-txt')); $this->assertNotEquals("User-agent: *\nDisallow: /", $response->getContent());