##// END OF EJS Templates
Fixed that requesting a message from an invalid forum should respond with 404 (#13232)....
Jean-Philippe Lang -
r11216:d1244b31a4c2
parent child
Show More
@@ -125,7 +125,7 class MessagesController < ApplicationController
125 125
126 126 private
127 127 def find_message
128 find_board
128 return unless find_board
129 129 @message = @board.messages.find(params[:id], :include => :parent)
130 130 @topic = @message.root
131 131 rescue ActiveRecord::RecordNotFound
@@ -137,5 +137,6 private
137 137 @project = @board.project
138 138 rescue ActiveRecord::RecordNotFound
139 139 render_404
140 nil
140 141 end
141 142 end
@@ -74,6 +74,11 class MessagesControllerTest < ActionController::TestCase
74 74 assert_response 404
75 75 end
76 76
77 def test_show_message_from_invalid_board_should_respond_with_404
78 get :show, :board_id => 999, :id => 1
79 assert_response 404
80 end
81
77 82 def test_get_new
78 83 @request.session[:user_id] = 2
79 84 get :new, :board_id => 1
General Comments 0
You need to be logged in to leave comments. Login now