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