diff --git a/app/controllers/buckets_controller.rb b/app/controllers/buckets_controller.rb index b6cbe66dc..63357bb92 100644 --- a/app/controllers/buckets_controller.rb +++ b/app/controllers/buckets_controller.rb @@ -1,10 +1,5 @@ class BucketsController < ApplicationController - before_action :set_bucket, except: %i[ index new create ] - - def index - @filters = Current.user.filters.all - @buckets = Current.user.buckets.all - end + before_action :set_bucket, except: %i[ new create ] def new @bucket = Current.account.buckets.build @@ -29,7 +24,7 @@ class BucketsController < ApplicationController def destroy @bucket.destroy - redirect_to buckets_path + redirect_to root_path end private diff --git a/app/views/buckets/index.html.erb b/app/views/buckets/index.html.erb deleted file mode 100644 index 0e7ce3438..000000000 --- a/app/views/buckets/index.html.erb +++ /dev/null @@ -1,30 +0,0 @@ -<% @page_title = "Collections" %> - -<% content_for :header do %> - -<% end %> - - - \ No newline at end of file diff --git a/test/controllers/buckets_controller_test.rb b/test/controllers/buckets_controller_test.rb index 15b0c1c5e..3882e0480 100644 --- a/test/controllers/buckets_controller_test.rb +++ b/test/controllers/buckets_controller_test.rb @@ -5,11 +5,6 @@ class BucketsControllerTest < ActionDispatch::IntegrationTest sign_in_as :kevin end - test "index" do - get buckets_url - assert_response :success - end - test "new" do get new_bucket_url assert_response :success @@ -56,7 +51,7 @@ class BucketsControllerTest < ActionDispatch::IntegrationTest test "destroy" do assert_difference -> { Bucket.count }, -1 do delete bucket_url(buckets(:writebook)) - assert_redirected_to buckets_url + assert_redirected_to root_url end end end