Stub nominatim for reverse lookups in diary tests
authorTom Hughes <tom@compton.nu>
Wed, 9 Nov 2016 21:54:26 +0000 (21:54 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 9 Nov 2016 21:54:26 +0000 (21:54 +0000)
test/controllers/diary_entry_controller_test.rb

index 4a8451e89b2a044edc3e212f8ee529327c61470e..5e53cb6b0cb137c92b4812e8eaf7d54fe0d66a1e 100644 (file)
@@ -8,6 +8,9 @@ class DiaryEntryControllerTest < ActionController::TestCase
   def setup
     # Create the default language for diary entries
     create(:language, :code => "en")
+    # Stub nominatim response for diary entry locations
+    stub_request(:get, %r{^http://nominatim\.openstreetmap\.org/reverse\?})
+      .to_return(:status => 404)
   end
 
   ##