diff --git a/app/controllers/my_profile/cms_controller.rb b/app/controllers/my_profile/cms_controller.rb index e2bfd4e..583b3a1 100644 --- a/app/controllers/my_profile/cms_controller.rb +++ b/app/controllers/my_profile/cms_controller.rb @@ -291,7 +291,7 @@ class CmsController < MyProfileController def search query = params[:q] - results = query.blank? ? [] : profile.articles.published.find_by_contents(query) + results = query.blank? ? [] : profile.articles.published.find_by_contents(query)[:results] render :text => article_list_to_json(results), :content_type => 'application/json' end def media_upload diff --git a/test/functional/cms_controller_test.rb b/test/functional/cms_controller_test.rb index 7e36d56..bb5114c 100644 --- a/test/functional/cms_controller_test.rb +++ b/test/functional/cms_controller_test.rb @@ -9,6 +9,7 @@ class CmsControllerTest < Test::Unit::TestCase fixtures :environments def setup + Test::Unit::TestCase::setup @controller = CmsController.new @request = ActionController::TestRequest.new @request.stubs(:ssl?).returns(true) -- libgit2 0.21.2