aboutsummaryrefslogtreecommitdiffstats
path: root/test/ng/directive/ngSrcsetSpec.js
blob: 8fccb00ae906585e07aed6ff28aba04524e4621b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
'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');
  }));
});