tests failing jstd to show cory

This commit is contained in:
Misko Hevery
2010-04-08 13:43:40 -07:00
parent e0ad7dfcd4
commit c4ef1f2fdd
20 changed files with 171 additions and 269 deletions

View File

@@ -66,7 +66,9 @@ describe("service $invalidWidgets", function(){
});
it("should count number of invalid widgets", function(){
var scope = compile('<input name="price" ng-required></input>').$init();
var doc = jqLite(window.document.body);
doc.append('<input name="price" ng-required></input>');
var scope = compile(doc).$init();
expect(scope.$invalidWidgets.length).toEqual(1);
scope.price = 123;
scope.$eval();