inital empty page
This commit is contained in:
parent
3e9d32e21d
commit
8d7b50a7ae
|
@ -5,3 +5,9 @@ Enables stripe payments from discourse.
|
||||||
# Configuration
|
# Configuration
|
||||||
|
|
||||||
You can either set your environment vars in docker or save them in a yaml.
|
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
|
module Choice
|
||||||
class ChoiceController < Choice::ApplicationController
|
class ChoiceController < ApplicationController
|
||||||
|
def index
|
||||||
|
render json: {}
|
||||||
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
badge = Badge.find_by_name('Consumer Defender')
|
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
|
Choice::Engine.routes.draw do
|
||||||
get 'stripe' => 'choice#create'
|
get 'stripe' => 'choice#create'
|
||||||
|
get 'form' => 'choice#index'
|
||||||
end
|
end
|
||||||
|
|
|
@ -19,8 +19,6 @@ module ::Choice
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
after_initialize do
|
Discourse::Application.routes.prepend do
|
||||||
Discourse::Application.routes.prepend do
|
mount ::Choice::Engine, at: '/choice'
|
||||||
mount ::Choice::Engine, at: '/choice'
|
|
||||||
end
|
|
||||||
end
|
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