From 8785e984648975377ccb35bc0622a9ecafde8b8d Mon Sep 17 00:00:00 2001 From: Rimian Perkins Date: Thu, 12 Sep 2019 13:13:06 +1000 Subject: [PATCH] readme some --- README.md | 6 ++++++ .../discourse_patrons/patrons_controller_spec.rb | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/README.md b/README.md index 793e2a3..714e846 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,12 @@ This is a newer version of https://github.com/rimian/discourse-donations. Many t * Add your Stripe public and private keys in settings and set the currency to your local value. * Enable the plugin and wait for people to donate money. +## Usage + +Enable the plugin and enter your Stripe API keys in the settings. You can also configure amounts and the default currency. + +Visit `/patrons` + ## Testing ## Warranty diff --git a/spec/controllers/discourse_patrons/patrons_controller_spec.rb b/spec/controllers/discourse_patrons/patrons_controller_spec.rb index a249e2a..878111f 100644 --- a/spec/controllers/discourse_patrons/patrons_controller_spec.rb +++ b/spec/controllers/discourse_patrons/patrons_controller_spec.rb @@ -36,6 +36,12 @@ module DiscoursePatrons post :create, params: {}, format: :json expect(response).to have_http_status(200) end + + it 'has curency' do + ::Stripe::PaymentIntent.expects(:create).with(has_entry(:currency, 'AUD')) + post :create, params: {}, format: :json + expect(response).to have_http_status(200) + end end end end