mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-29 18:46:23 -05:00
23 lines
556 B
Text
23 lines
556 B
Text
|
import createStore from 'helpers/create-store';
|
||
|
|
||
|
export default function(name, opts) {
|
||
|
opts = opts || {};
|
||
|
|
||
|
test(name, function(assert) {
|
||
|
if (opts.setup) {
|
||
|
const store = createStore();
|
||
|
opts.setup.call(this, store);
|
||
|
}
|
||
|
this.container.register('site-settings:main', Discourse.SiteSettings, { instantiate: false });
|
||
|
this.container.injection('component', 'siteSettings', 'site-settings:main');
|
||
|
|
||
|
andThen(() => {
|
||
|
this.render(opts.template);
|
||
|
});
|
||
|
|
||
|
andThen(() => {
|
||
|
opts.test.call(this, assert);
|
||
|
});
|
||
|
});
|
||
|
}
|