pretty js

This commit is contained in:
Rimian Perkins 2019-09-14 17:28:58 +10:00
parent 059acbdbb8
commit 871cec9ec3
4 changed files with 13 additions and 3 deletions

View File

@ -14,6 +14,10 @@ module DiscoursePatrons
render json: result
end
def show
head 200
end
def create
::Stripe.api_key = SiteSetting.discourse_patrons_secret_key

View File

@ -1,6 +1,5 @@
export default Ember.Controller.extend({
actions: {
loadMore() {
}
loadMore() {}
}
});

View File

@ -3,7 +3,7 @@
DiscoursePatrons::Engine.routes.draw do
get '/admin' => 'admin#index'
get '/' => 'patrons#index'
get '/:pid' => 'patrons#index'
get '/:pid' => 'patrons#show'
resources :patrons, only: [:index, :create]
end

View File

@ -27,6 +27,13 @@ module DiscoursePatrons
end
end
describe 'show' do
it 'responds ok' do
get :show, params: { pid: '123' }, format: :json
expect(response).to have_http_status(200)
end
end
describe 'create' do
let(:payment) do
{