potential fix for #2192
This commit is contained in:
@@ -16,6 +16,25 @@ class ForumTopicsControllerTest < ActionController::TestCase
|
||||
CurrentUser.ip_addr = nil
|
||||
end
|
||||
|
||||
context "show action" do
|
||||
should "render" do
|
||||
get :show, {:id => @forum_topic.id}
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
context "when the read_forum_topics session exceeds the maximum cookie size" do
|
||||
setup do
|
||||
@cookie_data = 1.upto(10_000).to_a.join(" ")
|
||||
end
|
||||
|
||||
should "truncate" do
|
||||
get :show, {:id => @forum_topic.id}, {:user_id => @user.id, :read_forum_topics => @cookie_data}
|
||||
assert_response :success
|
||||
assert_equal(1570, session[:read_forum_topics].size)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "index action" do
|
||||
should "list all forum topics" do
|
||||
get :index
|
||||
|
||||
Reference in New Issue
Block a user