mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-04-05 07:31:01 +00:00
18 lines
432 B
JavaScript
18 lines
432 B
JavaScript
|
|
'use strict';
|
||
|
|
|
||
|
|
describe('ngSrc', function() {
|
||
|
|
var element;
|
||
|
|
|
||
|
|
afterEach(function() {
|
||
|
|
dealoc(element);
|
||
|
|
});
|
||
|
|
|
||
|
|
it('should not result empty string in img src', inject(function($rootScope, $compile) {
|
||
|
|
$rootScope.image = {};
|
||
|
|
element = $compile('<img ng-src="{{image.url}}">')($rootScope);
|
||
|
|
$rootScope.$digest();
|
||
|
|
expect(element.attr('src')).not.toBe('');
|
||
|
|
expect(element.attr('src')).toBe(undefined);
|
||
|
|
}));
|
||
|
|
});
|