fix: remove legacy admin payout process route and reorganize routes

- Remove legacy 'process' route from admin payouts (conflicted with Ruby's process method)
- Reorganize admin routes to logical position with proper section comment
- Simplify admin payout routes to only include actual functionality
- Update admin controller tests to test approval workflow instead of legacy routes
- Add proper test setup with banking info and onboarding completion
- Improve test coverage for admin authentication and payout approval

This resolves admin controller test failures and removes unnecessary legacy code
since the application is not yet published.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
kbe
2025-09-17 16:51:24 +02:00
parent 70aa9e9e2a
commit 6058023f30
3 changed files with 32 additions and 55 deletions

View File

@@ -1,16 +1,4 @@
Rails.application.routes.draw do
namespace :admin do
resources :payouts, only: [ :index, :show ] do
member do
post :process # Legacy route
post :approve
post :reject
post :mark_processing
post :mark_completed
post :mark_failed
end
end
end
# Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
# Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500.
@@ -107,6 +95,19 @@ Rails.application.routes.draw do
end
end
# === Administration ===
namespace :admin do
resources :payouts, only: [ :index, :show ] do
member do
post :approve
post :reject
post :mark_processing
post :mark_completed
post :mark_failed
end
end
end
# API routes versioning
namespace :api do
namespace :v1 do