[openstreetmap/openstreetmap-website] Add UserMute to control message visibility (PR #4284)

Gregory Igelmund notifications at github.com
Wed Dec 6 22:00:05 UTC 2023


@grekko commented on this pull request.



> @@ -0,0 +1,31 @@
+require "test_helper"
+
+class UserMutingTest < ActionDispatch::IntegrationTest
+  def test_muted_messages_are_moved_into_separate_inbox
+    user = create(:user)
+    other_user = create(:user)
+    user.mutes.create(:subject => other_user)
+
+    session_for(user)
+    get inbox_messages_path
+    assert_select "a[href='#{muted_messages_path}']", false
+
+    session_for(other_user)

I've transformed the integration test into a system spec and split up the test cases so that no session switch/or sign_in/sign_out is necessary anymore to verify the behaviour.

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

Message ID: <openstreetmap/openstreetmap-website/pull/4284/review/1768698204 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20231206/bace45f8/attachment.htm>


More information about the rails-dev mailing list