From: Tom Hughes Date: Thu, 5 Sep 2019 19:30:34 +0000 (+0100) Subject: When overriding setup make sure to call the superclass X-Git-Tag: live~2413 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/e219916dcbb00fe179d27a3c1b32139c511f9c2e When overriding setup make sure to call the superclass --- diff --git a/test/controllers/api/notes_controller_test.rb b/test/controllers/api/notes_controller_test.rb index 5f449f0d6..54a20028d 100644 --- a/test/controllers/api/notes_controller_test.rb +++ b/test/controllers/api/notes_controller_test.rb @@ -3,6 +3,7 @@ require "test_helper" module Api class NotesControllerTest < ActionController::TestCase def setup + super # Stub nominatim response for note locations stub_request(:get, %r{^https://nominatim\.openstreetmap\.org/reverse\?}) .to_return(:status => 404) diff --git a/test/controllers/api/users_controller_test.rb b/test/controllers/api/users_controller_test.rb index 93a7eeb55..de402ebf8 100644 --- a/test/controllers/api/users_controller_test.rb +++ b/test/controllers/api/users_controller_test.rb @@ -3,6 +3,8 @@ require "test_helper" module Api class UsersControllerTest < ActionController::TestCase def setup + super + stub_hostip_requests end diff --git a/test/controllers/diary_entries_controller_test.rb b/test/controllers/diary_entries_controller_test.rb index 8414e18a7..e959133a0 100644 --- a/test/controllers/diary_entries_controller_test.rb +++ b/test/controllers/diary_entries_controller_test.rb @@ -4,6 +4,7 @@ class DiaryEntriesControllerTest < ActionController::TestCase include ActionView::Helpers::NumberHelper def setup + super # Create the default language for diary entries create(:language, :code => "en") # Stub nominatim response for diary entry locations diff --git a/test/controllers/notes_controller_test.rb b/test/controllers/notes_controller_test.rb index 82821de6c..5c71d722f 100644 --- a/test/controllers/notes_controller_test.rb +++ b/test/controllers/notes_controller_test.rb @@ -2,6 +2,7 @@ require "test_helper" class NotesControllerTest < ActionController::TestCase def setup + super # Stub nominatim response for note locations stub_request(:get, %r{^https://nominatim\.openstreetmap\.org/reverse\?}) .to_return(:status => 404) diff --git a/test/controllers/site_controller_test.rb b/test/controllers/site_controller_test.rb index a2ea86f6f..c7826062b 100644 --- a/test/controllers/site_controller_test.rb +++ b/test/controllers/site_controller_test.rb @@ -4,6 +4,8 @@ class SiteControllerTest < ActionController::TestCase ## # setup oauth keys def setup + super + Settings.id_key = create(:client_application).key Settings.potlatch2_key = create(:client_application).key diff --git a/test/controllers/users_controller_test.rb b/test/controllers/users_controller_test.rb index 62e06fc58..feca92df5 100644 --- a/test/controllers/users_controller_test.rb +++ b/test/controllers/users_controller_test.rb @@ -2,6 +2,8 @@ require "test_helper" class UsersControllerTest < ActionController::TestCase def setup + super + stub_hostip_requests end