discourse/test/javascripts/views/text-field-test.js.es6

18 lines
451 B
Text
Raw Normal View History

2014-07-30 18:56:01 -04:00
moduleForComponent("text-field");
test("renders correctly with no properties set", function() {
2014-07-30 18:56:01 -04:00
var component = this.subject();
equal(component.get('type'), "text");
});
2014-07-30 18:56:01 -04:00
test("support a placeholder", function() {
sandbox.stub(I18n, "t").returnsArg(0);
2014-07-30 18:56:01 -04:00
var component = this.subject({
placeholderKey: "placeholder.i18n.key"
});
2014-07-30 18:56:01 -04:00
equal(component.get('type'), "text");
equal(component.get('placeholder'), "placeholder.i18n.key");
});