mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Remove ObjectController, Discouse Controllers + Presence
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
import Presence from 'discourse/mixins/presence';
|
||||
|
||||
module("mixin:presence");
|
||||
|
||||
var testObj = Em.Object.createWithMixins(Presence, {
|
||||
emptyString: "",
|
||||
nonEmptyString: "Evil Trout",
|
||||
emptyArray: [],
|
||||
nonEmptyArray: [1, 2, 3],
|
||||
age: 34
|
||||
});
|
||||
|
||||
test("present", function() {
|
||||
ok(testObj.present('nonEmptyString'), "Non empty strings are present");
|
||||
ok(!testObj.present('emptyString'), "Empty strings are not present");
|
||||
ok(testObj.present('nonEmptyArray'), "Non Empty Arrays are present");
|
||||
ok(!testObj.present('emptyArray'), "Empty arrays are not present");
|
||||
ok(testObj.present('age'), "integers are present");
|
||||
});
|
||||
|
||||
test("blank", function() {
|
||||
ok(testObj.blank('emptyString'), "Empty strings are blank");
|
||||
ok(!testObj.blank('nonEmptyString'), "Non empty strings are not blank");
|
||||
ok(testObj.blank('emptyArray'), "Empty arrays are blank");
|
||||
ok(!testObj.blank('nonEmptyArray'), "Non empty arrays are not blank");
|
||||
ok(testObj.blank('missing'), "Missing properties are blank");
|
||||
});
|
||||
@@ -1,3 +1,4 @@
|
||||
import { blank, present } from 'helpers/qunit-helpers';
|
||||
import Singleton from 'discourse/mixins/singleton';
|
||||
|
||||
module("mixin:singleton");
|
||||
|
||||
Reference in New Issue
Block a user