mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-26 06:43:43 +00:00
test($compile): fix IE specific test.
This commit is contained in:
parent
cefdaf131d
commit
0960cd0613
1 changed files with 3 additions and 3 deletions
|
|
@ -131,15 +131,15 @@ describe('ngSrc', function() {
|
||||||
// then calling element.setAttribute('src', 'foo') doesn't do anything, so we need
|
// then calling element.setAttribute('src', 'foo') doesn't do anything, so we need
|
||||||
// to set the property as well to achieve the desired effect
|
// to set the property as well to achieve the desired effect
|
||||||
|
|
||||||
var element = $compile('<div ng-src="some/{{id}}"></div>')($rootScope);
|
var element = $compile('<div ng-src="{{id}}"></div>')($rootScope);
|
||||||
|
|
||||||
$rootScope.$digest();
|
$rootScope.$digest();
|
||||||
expect(element.prop('src')).toEqual('some/');
|
expect(element.prop('src')).toBeUndefined();
|
||||||
|
|
||||||
$rootScope.$apply(function() {
|
$rootScope.$apply(function() {
|
||||||
$rootScope.id = 1;
|
$rootScope.id = 1;
|
||||||
});
|
});
|
||||||
expect(element.prop('src')).toEqual('some/1');
|
expect(element.prop('src')).toEqual('1');
|
||||||
|
|
||||||
dealoc(element);
|
dealoc(element);
|
||||||
}));
|
}));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue