2015-05-14 02:12:54 +08:00
|
|
|
moduleForComponent("text-field", {needs: []});
|
2013-12-20 02:29:15 +08:00
|
|
|
|
|
|
|
test("renders correctly with no properties set", function() {
|
2014-07-31 06:56:01 +08:00
|
|
|
var component = this.subject();
|
|
|
|
equal(component.get('type'), "text");
|
2013-12-20 02:29:15 +08:00
|
|
|
});
|
|
|
|
|
2014-07-31 06:56:01 +08:00
|
|
|
test("support a placeholder", function() {
|
|
|
|
sandbox.stub(I18n, "t").returnsArg(0);
|
2013-12-20 02:29:15 +08:00
|
|
|
|
2014-07-31 06:56:01 +08:00
|
|
|
var component = this.subject({
|
2013-12-20 02:29:15 +08:00
|
|
|
placeholderKey: "placeholder.i18n.key"
|
|
|
|
});
|
|
|
|
|
2014-07-31 06:56:01 +08:00
|
|
|
equal(component.get('type'), "text");
|
|
|
|
equal(component.get('placeholder'), "placeholder.i18n.key");
|
2013-12-20 02:29:15 +08:00
|
|
|
});
|