[openstreetmap/openstreetmap-website] Show heatmap only to logged in users (PR #5829)
Anton Khorev
notifications at github.com
Tue May 20 15:39:28 UTC 2025
@AntonKhorev commented on this pull request.
> 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
- assert(heatmap_data[:data].values.all? { |entry| entry[:date] && entry[:total_changes] }, "Heatmap data should have :date and :total_changes keys")
+ assert(heatmap_data[:data].values.all? { |entry| entry[:date] && entry[:total_changes] && entry[:max_id] }, "Heatmap data should have :date and :total_changes keys")
Rewrote it without naming the keys in the message.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5829#discussion_r2098299887
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5829/review/2854718290 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250520/c3cb5fe6/attachment.htm>
More information about the rails-dev
mailing list