]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/redactions_controller_test.rb
Link to previous/next nonempty user's changeset on changeset pages
[rails.git] / test / controllers / redactions_controller_test.rb
index 002e483fea3262e6e45c9f2f1be129f6079ee8fa..5ca72fe478263bde3b0234638990f1fc13ad8d92 100644 (file)
@@ -45,6 +45,15 @@ class RedactionsControllerTest < ActionDispatch::IntegrationTest
     end
   end
 
+  def test_show
+    redaction = create(:redaction, :title => "tested-redaction")
+
+    get redaction_path(redaction)
+    assert_response :success
+    assert_dom "h1", :text => /tested-redaction/
+    assert_dom "a[href='#{user_path redaction.user}']", :text => redaction.user.display_name
+  end
+
   def test_new
     get new_redaction_path
     assert_redirected_to login_path(:referer => new_redaction_path)