inital empty page
This commit is contained in:
parent
3e9d32e21d
commit
8d7b50a7ae
|
@ -5,3 +5,9 @@ Enables stripe payments from discourse.
|
|||
# Configuration
|
||||
|
||||
You can either set your environment vars in docker or save them in a yaml.
|
||||
|
||||
# Testing
|
||||
|
||||
Run the local js acceptance tests here:
|
||||
|
||||
http://localhost:3000/qunit?module=Acceptance%3A%20Choice%20Discourse
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
module Choice
|
||||
class ChoiceController < Choice::ApplicationController
|
||||
class ChoiceController < ApplicationController
|
||||
def index
|
||||
render json: {}
|
||||
end
|
||||
|
||||
def create
|
||||
badge = Badge.find_by_name('Consumer Defender')
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
export default function() {
|
||||
this.route('choice', function() {
|
||||
this.route('form');
|
||||
});
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
import { ajax } from 'discourse/lib/ajax';
|
||||
|
||||
export default Ember.Route.extend({
|
||||
model() {
|
||||
return ajax('/choice/form.json');
|
||||
}
|
||||
});
|
|
@ -0,0 +1 @@
|
|||
<h1>Choice</h1>
|
|
@ -1,3 +1,4 @@
|
|||
Choice::Engine.routes.draw do
|
||||
get 'stripe' => 'choice#create'
|
||||
get 'form' => 'choice#index'
|
||||
end
|
||||
|
|
|
@ -19,8 +19,6 @@ module ::Choice
|
|||
end
|
||||
end
|
||||
|
||||
after_initialize do
|
||||
Discourse::Application.routes.prepend do
|
||||
mount ::Choice::Engine, at: '/choice'
|
||||
end
|
||||
Discourse::Application.routes.prepend do
|
||||
mount ::Choice::Engine, at: '/choice'
|
||||
end
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
import { acceptance } from 'helpers/qunit-helpers';
|
||||
acceptance('Choice Discourse', { loggedIn: true });
|
||||
|
||||
test('Choice Page Exists', () => {
|
||||
visit('/choice/form');
|
||||
|
||||
andThen(() => {
|
||||
ok(exists('h1'), 'Choice');
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue