From 3714303e85387050227d0f3439ecdc3f118dcef4 Mon Sep 17 00:00:00 2001 From: DeeDeeG Date: Tue, 24 Dec 2019 17:55:25 -0500 Subject: [PATCH] restrooms_spec.rb: Fix a test (#608) Background: The Mission Creek Cafe in San Francisco has been closed for some time. Google Maps API now resolves "Mission Creek Cafe" to a coffee shop in Washington state. Washington is too far away from our stub restroom entries; No stub restrooms are located near Washington, so no restroom results are shown on our results page for this search. The test expects to see a stub restroom entry on the reults page, but does not see it, and so the test fails. --- Fix: search the Maps API for "San Francisco," not "Mission Creek Cafe" (This returns a lat/long associated with San Francisco not Washington) --- spec/features/restrooms_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/features/restrooms_spec.rb b/spec/features/restrooms_spec.rb index 76582159..ea448610 100644 --- a/spec/features/restrooms_spec.rb +++ b/spec/features/restrooms_spec.rb @@ -45,7 +45,7 @@ create(:restroom, :geocoded, name: 'Mission Creek Cafe') visit root_path - fill_in 'search', with: 'Mission Creek Cafe' + fill_in 'search', with: 'San Francisco' click_on 'Search' expect(page).to have_content 'Mission Creek Cafe'