diff --git a/README.md b/README.md index eb4615a..389dffd 100644 --- a/README.md +++ b/README.md @@ -17,9 +17,9 @@ Visit `/admin/plugins` and configure your private and public keys. ## Testing -To run the rails specs, install the plugin and run `bundle exec rake plugin:spec[discourse-donations]` in the discourse root directory. - -To run qunit tests: `MODULE='Acceptance: Discourse Donations' bundle exec rake qunit:test[20000]`. +* To run the rails specs, install the plugin and run `bundle exec rake plugin:spec[discourse-donations]` in the discourse root directory. +* To run qunit tests: `MODULE='Acceptance: Discourse Donations' bundle exec rake qunit:test[20000]`. +* To run Component tests: `MODULE='component:stripe-card' bundle exec rake qunit:test[20000]`. **Note:** diff --git a/assets/javascripts/discourse/templates/connectors/user-profile-primary/link.hbs b/assets/javascripts/discourse/templates/connectors/user-profile-primary/link.hbs deleted file mode 100644 index 6fb4ef1..0000000 --- a/assets/javascripts/discourse/templates/connectors/user-profile-primary/link.hbs +++ /dev/null @@ -1,5 +0,0 @@ -{{#if siteSettings.discourse_donations_enabled}} -
- Donate -
-{{/if}} diff --git a/plugin.rb b/plugin.rb index bb5c5ce..89aa6d9 100644 --- a/plugin.rb +++ b/plugin.rb @@ -1,6 +1,6 @@ # name: discourse-donations # about: Integrating Discourse with Stripe for donations -# version: 1.6.8 +# version: 1.7.0 # url: https://github.com/choiceaustralia/discourse-donations # authors: Rimian Perkins @@ -11,7 +11,15 @@ load File.expand_path('../lib/discourse_donations/engine.rb', __FILE__) enabled_site_setting :discourse_donations_enabled after_initialize do - header_script = '' + header_script = <<-EOF.strip_heredoc.chomp + + +EOF discourse_donations_customization = SiteCustomization.find_or_create_by({ name: 'Discourse Donations Header', diff --git a/test/javascripts/components/stripe-card-test.js.es6 b/test/javascripts/components/stripe-card-test.js.es6 new file mode 100644 index 0000000..2156a1b --- /dev/null +++ b/test/javascripts/components/stripe-card-test.js.es6 @@ -0,0 +1,24 @@ +import componentTest from 'helpers/component-test'; + +moduleForComponent('stripe-card', { integration: true }); + +window.Stripe = function() { + return { + elements: function() { + return { + create: function() { + return { + mount: function() {} + }; + } + }; + }, + }; +}; + +componentTest('stripe card', { + template: `{{stripe-card}}`, + test(assert) { + assert.ok(true); + } +});