]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/user_mutes_controller_test.rb
Replace lookup_user_by_id with load_resource
[rails.git] / test / controllers / user_mutes_controller_test.rb
index cc22faaaa1dfc3ca8c175fd3c5eede9cdf58d673..2e98dc819866a05512d0f12a78a4905fb9e9af97 100644 (file)
@@ -18,11 +18,13 @@ class UserMutesControllerTest < ActionDispatch::IntegrationTest
 
   def test_index
     user = create(:user)
-    user.mutes.create(:subject => create(:user))
+    muted_user = create(:user)
+    user.mutes.create(:subject => muted_user)
     session_for(user)
 
     get user_mutes_path
     assert_match "You have muted 1 User", @response.body
+    assert_dom "tr a[href='#{user_path muted_user}']", :text => muted_user.display_name
   end
 
   def test_create