diff --git a/app/controllers/discourse_payments/choice_controller.rb b/app/controllers/discourse_payments/payments_controller.rb similarity index 92% rename from app/controllers/discourse_payments/choice_controller.rb rename to app/controllers/discourse_payments/payments_controller.rb index 5eafca6..1dfba44 100644 --- a/app/controllers/discourse_payments/choice_controller.rb +++ b/app/controllers/discourse_payments/payments_controller.rb @@ -1,5 +1,5 @@ module DiscoursePayments - class ChoiceController < ApplicationController + class PaymentsController < ApplicationController def index render json: {} end diff --git a/config/routes.rb b/config/routes.rb index 1dc5f3d..f3644e9 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,4 +1,4 @@ DiscoursePayments::Engine.routes.draw do - resources :choice, only: [:create] - get 'users/:username/payments' => 'choice#show' + resources :payments, only: [:create] + get 'users/:username/payments' => 'payments#show' end diff --git a/spec/controllers/discourse_payments/choice_controller_spec.rb b/spec/controllers/discourse_payments/payments_controller_spec.rb similarity index 78% rename from spec/controllers/discourse_payments/choice_controller_spec.rb rename to spec/controllers/discourse_payments/payments_controller_spec.rb index 59095d9..cfec190 100644 --- a/spec/controllers/discourse_payments/choice_controller_spec.rb +++ b/spec/controllers/discourse_payments/payments_controller_spec.rb @@ -1,7 +1,7 @@ require 'rails_helper' module DiscoursePayments - RSpec.describe ChoiceController, type: :controller do + RSpec.describe PaymentsController, type: :controller do routes { DiscoursePayments::Engine.routes } # it 'responds with ok' do