]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/diary_entries_controller_test.rb
Merge remote-tracking branch 'upstream/pull/4426'
[rails.git] / test / controllers / diary_entries_controller_test.rb
index c8aaf64097464d8056719aecc4b8d6cde40ee175..b474468789d342a5e3a71df904518dd22ad14e79 100644 (file)
@@ -695,9 +695,9 @@ class DiaryEntriesControllerTest < ActionDispatch::IntegrationTest
     assert_template :show
 
     # Try a non-integer ID
     assert_template :show
 
     # Try a non-integer ID
-    assert_raise ActionController::RoutingError do
-      get "/user/#{CGI.escape(user.display_name)}/diary/#{diary_entry.id})"
-    end
+    get "/user/#{CGI.escape(user.display_name)}/diary/#{diary_entry.id})"
+    assert_response :not_found
+    assert_template "rescues/routing_error"
 
     # Try a deleted entry
     diary_entry_deleted = create(:diary_entry, :user => user, :visible => false)
 
     # Try a deleted entry
     diary_entry_deleted = create(:diary_entry, :user => user, :visible => false)