]> git.openstreetmap.org Git - rails.git/commitdiff
Pass min/max lat/lon to notes rss feed builder
authorAnton Khorev <tony29@yandex.ru>
Tue, 25 Oct 2022 10:35:18 +0000 (13:35 +0300)
committerAnton Khorev <tony29@yandex.ru>
Tue, 25 Oct 2022 10:35:18 +0000 (13:35 +0300)
app/controllers/api/notes_controller.rb
test/controllers/api/notes_controller_test.rb

index c152c6272266a352c9d2f1d5b5dbfcf6b2d81263..7f508ab34be07948d68854fab4c79bee78349794 100644 (file)
@@ -190,6 +190,10 @@ module Api
         bbox.check_size(Settings.max_note_request_area)
 
         notes = notes.bbox(bbox)
+        @min_lon = bbox.min_lon
+        @min_lat = bbox.min_lat
+        @max_lon = bbox.max_lon
+        @max_lat = bbox.max_lat
       end
 
       # Find the comments we want to return
index f7e7c77f48c30c1d474c7705be682e4a9631480d..f46647f02e9b6d172d2afe663d171298b0063323 100644 (file)
@@ -1032,6 +1032,7 @@ module Api
       assert_equal "application/rss+xml", @response.media_type
       assert_select "rss", :count => 1 do
         assert_select "channel", :count => 1 do
+          assert_select "description", :text => /1\.2/, :count => 1
           assert_select "item", :count => 2
         end
       end