[openstreetmap/openstreetmap-website] Add user block api call (PR #4301)

Anton Khorev notifications at github.com
Sat Oct 21 16:30:04 UTC 2023


@AntonKhorev commented on this pull request.



> +      assert_predicate block, :active?
+      assert_equal "because", block.reason
+      assert_equal creator_user, block.creator
+
+      assert_equal "application/xml", @response.media_type
+      assert_select "osm>user_block", 1
+      assert_select "osm>user_block>@id", block.id.to_s
+      assert_select "osm>user_block>@needs_view", "false"
+      assert_select "osm>user_block>user", 1
+      assert_select "osm>user_block>user>@uid", blocked_user.id.to_s
+      assert_select "osm>user_block>creator", 1
+      assert_select "osm>user_block>creator>@uid", creator_user.id.to_s
+      assert_select "osm>user_block>revoker", 0
+      assert_select "osm>user_block>reason", 1
+      assert_select "osm>user_block>reason", "because"
+    end

updated, had to use

```ruby
assert_select ">@id", block.id.to_s
```

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

Message ID: <openstreetmap/openstreetmap-website/pull/4301/review/1691286971 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20231021/b7e1a10f/attachment.htm>


More information about the rails-dev mailing list