]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/diary_entries_controller_test.rb
Use data attributes to pass alternative button labels
[rails.git] / test / controllers / diary_entries_controller_test.rb
index 2003f9a085963ae717ffad02c795af678bb856cb..42d0426455262048d047748d51641c14a13f82c6 100644 (file)
@@ -669,6 +669,11 @@ class DiaryEntriesControllerTest < ActionDispatch::IntegrationTest
     assert_response :success
     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
+
     # Try a deleted entry
     diary_entry_deleted = create(:diary_entry, :user => user, :visible => false)
     get diary_entry_path(:display_name => user.display_name, :id => diary_entry_deleted)