mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
ES6: Migrated and deprecated a bunch of views
This commit is contained in:
@@ -6,13 +6,13 @@ var placeholderUsesKeyAndContext = function(key, context) {
|
||||
deepEqual(placeholder.context, context, "correct parameters are passed to the message");
|
||||
};
|
||||
|
||||
module("Discourse.SearchTextField", {
|
||||
module("view:search-text-field", {
|
||||
setup: function() {
|
||||
sinon.stub(I18n, "t", function(key, context) {
|
||||
return {key: key, context: context};
|
||||
});
|
||||
|
||||
view = Discourse.SearchTextField.create();
|
||||
view = viewClassFor('search-text-field').create();
|
||||
},
|
||||
|
||||
teardown: function() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
var appendTextFieldWithProperties = function(properties) {
|
||||
var view = Discourse.TextField.create(properties);
|
||||
var view = viewClassFor('text-field').create(properties);
|
||||
Ember.run(function() {
|
||||
view.appendTo(fixture());
|
||||
});
|
||||
@@ -13,7 +13,7 @@ var hasNoAttr = function($element, attrName) {
|
||||
equal($element.attr(attrName), undefined, "'" + attrName + "' attribute is not rendered");
|
||||
};
|
||||
|
||||
module("Discourse.TextField");
|
||||
module("view:text-field");
|
||||
|
||||
test("renders correctly with no properties set", function() {
|
||||
appendTextFieldWithProperties({});
|
||||
|
||||
Reference in New Issue
Block a user