mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-24 18:30:23 +00:00
17 lines
400 B
JavaScript
17 lines
400 B
JavaScript
|
|
'use strict';
|
||
|
|
|
||
|
|
describe('ngSrcset', function() {
|
||
|
|
var element;
|
||
|
|
|
||
|
|
afterEach(function() {
|
||
|
|
dealoc(element);
|
||
|
|
});
|
||
|
|
|
||
|
|
it('should not result empty string in img srcset', inject(function($rootScope, $compile) {
|
||
|
|
$rootScope.image = {};
|
||
|
|
element = $compile('<img ng-srcset="{{image.url}} 2x">')($rootScope);
|
||
|
|
$rootScope.$digest();
|
||
|
|
expect(element.attr('srcset')).toEqual(' 2x');
|
||
|
|
}));
|
||
|
|
});
|