[openstreetmap/openstreetmap-website] Render a not_found error for unavailable heatmaps (PR #6591)

Pablo Brasero notifications at github.com
Fri Dec 5 12:27:45 UTC 2025


@pablobm approved this pull request.

Nitpick aside, I think this is good 👍 Thank you!

> +      assert_response :success
+      # The data should not be empty
+      heatmap_data = assigns(:heatmap_data)
+      assert_not_nil heatmap_data
+      assert_predicate heatmap_data[:data], :any?
+      # The data should be in the right format
+      heatmap_data[:data].each_value do |entry|
+        assert_equal [:date, :max_id, :total_changes], entry.keys.sort, "Heatmap data entries should have expected keys"
+      end
+      assert_equal 30, heatmap_data[:count]
+    end
+
+    def test_show_data_unknown_user
+      get user_heatmap_path(:user_display_name => "unknown_user")
+
+      # Should fail for deleted users

```suggestion
      # Should fail for unknown users
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6591#pullrequestreview-3544549942
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/6591/review/3544549942 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20251205/003adfa9/attachment.htm>


More information about the rails-dev mailing list