Revert "REFACTOR: support booting discourse with DISCOURSE_NO_CONSTANTS"

This reverts commit c0b277d273536f6aab1df67d908ed5e306868b2a.
This commit is contained in:
Robin Ward
2015-11-20 10:00:12 -05:00
parent 1c8b3c9447
commit c21457d6a7
99 changed files with 384 additions and 394 deletions

View File

@ -185,7 +185,7 @@ test('initial category when uncategorized is not allowed', function() {
test('open with a quote', function() {
const quote = '[quote="neil, post:5, topic:413"]\nSimmer down you two.\n[/quote]';
const newComposer = function() {
return openComposer({action: Composer.REPLY, draftKey: 'asfd', draftSequence: 1, quote: quote});
return openComposer({action: Discourse.Composer.REPLY, draftKey: 'asfd', draftSequence: 1, quote: quote});
};
equal(newComposer().get('originalText'), quote, "originalText is the quote" );

View File

@ -1,7 +1,5 @@
import EmailLog from 'admin/models/email-log';
module("Discourse.EmailLog");
test("create", function() {
ok(EmailLog.create(), "it can be created without arguments");
ok(Discourse.EmailLog.create(), "it can be created without arguments");
});

View File

@ -1,10 +1,9 @@
import { blank } from 'helpers/qunit-helpers';
import Report from 'admin/models/report';
module("Report");
module("Discourse.Report");
function reportWithData(data) {
return Report.create({
return Discourse.Report.create({
type: 'topics',
data: _.map(data, function(val, index) {
return { x: moment().subtract(index, "days").format('YYYY-MM-DD'), y: val };

View File

@ -1,7 +1,5 @@
import StaffActionLog from 'admin/models/staff-action-log';
module("StaffActionLog");
module("Discourse.StaffActionLog");
test("create", function() {
ok(StaffActionLog.create(), "it can be created without arguments");
ok(Discourse.StaffActionLog.create(), "it can be created without arguments");
});

View File

@ -1,10 +1,8 @@
import VersionCheck from 'admin/models/version-check';
module("VersionCheck");
module("Discourse.VersionCheck");
test('dataIsOld', function() {
var dataIsOld = function(args, expected, message) {
equal(VersionCheck.create(args).get('dataIsOld'), expected, message);
equal(Discourse.VersionCheck.create(args).get('dataIsOld'), expected, message);
};
dataIsOld({updated_at: moment().subtract(2, 'hours').toJSON()}, false, '2 hours ago');
@ -17,7 +15,7 @@ test('staleData', function() {
return moment().subtract(hoursAgo, 'hours').toJSON();
};
var staleData = function(args, expected, message) {
equal(VersionCheck.create(args).get('staleData'), expected, message);
equal(Discourse.VersionCheck.create(args).get('staleData'), expected, message);
};
staleData({missing_versions_count: 0, installed_version: '0.9.3', latest_version: '0.9.3', updated_at: updatedAt(2)}, false, 'up to date');