fixed wrong tests which did not have matched tags

This commit is contained in:
Misko Hevery 2010-04-22 22:48:48 -07:00
parent 0396054b4a
commit c29dc1a940

View file

@ -243,7 +243,7 @@ describe("widget", function(){
}); });
it("should match urls", function(){ it("should match urls", function(){
var scope = angular.compile('<ng:switch on="url" using="route:params"><div ng-switch-when="/Book/:name">{{params.name}}</div></ng:include>'); var scope = angular.compile('<ng:switch on="url" using="route:params"><div ng-switch-when="/Book/:name">{{params.name}}</div></ng:switch>');
scope.url = '/Book/Moby'; scope.url = '/Book/Moby';
scope.$init(); scope.$init();
expect(scope.$element.text()).toEqual('Moby'); expect(scope.$element.text()).toEqual('Moby');
@ -256,7 +256,7 @@ describe("widget", function(){
}); });
it('should call init on switch', function(){ it('should call init on switch', function(){
var scope = angular.compile('<ng:switch on="url" change="name=\'works\'"><div ng-switch-when="a">{{name}}</div></ng:include>'); var scope = angular.compile('<ng:switch on="url" change="name=\'works\'"><div ng-switch-when="a">{{name}}</div></ng:switch>');
var cleared = false; var cleared = false;
scope.url = 'a'; scope.url = 'a';
scope.$invalidWidgets = {clearOrphans: function(){ scope.$invalidWidgets = {clearOrphans: function(){