clean(forms): cleanup

This commit is contained in:
vsavkin
2015-02-25 12:54:27 -08:00
parent f27e538e2c
commit cf9cb61665
6 changed files with 32 additions and 34 deletions

View File

@ -51,13 +51,12 @@ export function main() {
});
it("should run the validator with the initial value (invalid)", () => {
var g = new ControlGroup({
"one": new Control(null, validations.required)
});
var one = new Control(null, validations.required);
var g = new ControlGroup({"one": one});
expect(g.valid).toEqual(false);
expect(g.errors).toEqual({"one": {"required" : true}});
expect(g.errors).toEqual({"required": [one]});
});
it("should run the validator with the value changes", () => {