diff options
author | 2019-07-22 12:32:06 +0200 | |
---|---|---|
committer | 2019-07-22 12:32:06 +0200 | |
commit | a659a4da38e9b9a5d40dc8c4456f588c62e3896f (patch) | |
tree | f8508301844a775486b20eab41d610780f56b202 | |
parent | Provide a test fixture repo and use it for tests (diff) | |
download | packages-5-a659a4da38e9b9a5d40dc8c4456f588c62e3896f.tar.gz packages-5-a659a4da38e9b9a5d40dc8c4456f588c62e3896f.tar.bz2 packages-5-a659a4da38e9b9a5d40dc8c4456f588c62e3896f.zip |
Remove stubs for category search method
Signed-off-by: Hans de Graaff <graaff@gentoo.org>
-rw-r--r-- | app/controllers/categories_controller.rb | 5 | ||||
-rw-r--r-- | config/routes.rb | 6 | ||||
-rw-r--r-- | test/controllers/categories_controller_test.rb | 6 |
3 files changed, 2 insertions, 15 deletions
diff --git a/app/controllers/categories_controller.rb b/app/controllers/categories_controller.rb index e144df7..33817aa 100644 --- a/app/controllers/categories_controller.rb +++ b/app/controllers/categories_controller.rb @@ -1,5 +1,5 @@ class CategoriesController < ApplicationController - before_action :set_category, only: [:show, :search] + before_action :set_category, only: [:show] before_action :set_nav def index @@ -21,9 +21,6 @@ class CategoriesController < ApplicationController description: @category.description) end - def search - end - private def set_category diff --git a/config/routes.rb b/config/routes.rb index 57ad107..570ce7c 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -13,11 +13,7 @@ Rails.application.routes.draw do # Catch all old pgo feeds get 'feed(/*stuff)', to: 'about#legacy', defaults: { format: 'atom' } - resources :categories, only: [:index, :show, :search] do - member do - get 'search' - end - end + resources :categories, only: %i[index show search] resources :packages, only: [:index, :show, :search], constraints: { id: /[^.]*/ } do collection do diff --git a/test/controllers/categories_controller_test.rb b/test/controllers/categories_controller_test.rb index cc12462..994db38 100644 --- a/test/controllers/categories_controller_test.rb +++ b/test/controllers/categories_controller_test.rb @@ -11,10 +11,4 @@ class CategoriesControllerTest < ActionController::TestCase get :show, id: 'virtual' assert_response :success end - - test "should search category" do - get :search, id: 'virtual' - assert_response :success - end - end |