@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/[email protected]>_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev