diff --git a/app/controllers/list_controller.rb b/app/controllers/list_controller.rb index c03b760e09b..2f7740d1c85 100644 --- a/app/controllers/list_controller.rb +++ b/app/controllers/list_controller.rb @@ -83,7 +83,9 @@ class ListController < ApplicationController end def request_is_for_uncategorized? - params[:category] == Slug.for(SiteSetting.uncategorized_name) || params[:category] == SiteSetting.uncategorized_name + params[:category] == Slug.for(SiteSetting.uncategorized_name) || + params[:category] == SiteSetting.uncategorized_name || + params[:category] == 'uncategorized' end def build_topic_list_options diff --git a/spec/controllers/list_controller_spec.rb b/spec/controllers/list_controller_spec.rb index c8a5a74c4b3..1f24d374d97 100644 --- a/spec/controllers/list_controller_spec.rb +++ b/spec/controllers/list_controller_spec.rb @@ -85,10 +85,20 @@ describe ListController do response.should be_success end - it "responds with success when SiteSetting.uncategorized_name is non standard" do - SiteSetting.uncategorized_name = "testing" - xhr :get, :category, category: SiteSetting.uncategorized_name - response.should be_success + context 'SiteSetting.uncategorized_name is non standard' do + before do + SiteSetting.stubs(:uncategorized_name).returns('testing') + end + + it "responds with success given SiteSetting.uncategorized_name" do + xhr :get, :category, category: SiteSetting.uncategorized_name + response.should be_success + end + + it 'responds with success given "uncategorized"' do + xhr :get, :category, category: 'uncategorized' + response.should be_success + end end end