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