Chore: Added tests for subscriptions_controller (#483)

Added tests for subscriptions_controller
ref: #37
This commit is contained in:
Tim Lange
2020-02-17 03:21:45 +01:00
committed by GitHub
parent c32d391261
commit a2316d4d09
6 changed files with 62 additions and 17 deletions

View File

@@ -1,6 +1,8 @@
class Api::V1::SubscriptionsController < ApplicationController
class Api::V1::SubscriptionsController < Api::BaseController
skip_before_action :check_subscription
before_action :check_billing_enabled
def index
render json: current_account.subscription_data
end

View File

@@ -4,6 +4,7 @@ class Api::V1::WebhooksController < ApplicationController
skip_before_action :check_subscription
before_action :login_from_basic_auth, only: [:chargebee]
before_action :check_billing_enabled, only: [:chargebee]
def chargebee
chargebee_consumer.consume
head :ok