Skip to content

Commit a4f1ed5

Browse files
committed
style(warnings): prevent the browser from making bogus GET requests during tests
1 parent fe576f1 commit a4f1ed5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

test/directivesSpec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ describe("directive", function(){
111111

112112
describe('ng:bind-attr', function(){
113113
it('should bind attributes', function(){
114-
var scope = compile('<img ng:bind-attr="{src:\'http://localhost/mysrc\', alt:\'myalt\'}"/>');
114+
var scope = compile('<div ng:bind-attr="{src:\'http://localhost/mysrc\', alt:\'myalt\'}"/>');
115115
expect(element.attr('src')).toEqual('http://localhost/mysrc');
116116
expect(element.attr('alt')).toEqual('myalt');
117117
});

test/markupSpec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ describe("markups", function(){
3434
});
3535

3636
it('should translate {{}} in attributes', function(){
37-
compile('<img src="http://server/{{path}}.png"/>');
37+
compile('<div src="http://server/{{path}}.png"/>');
3838
expect(element.attr('ng:bind-attr')).toEqual('{"src":"http://server/{{path}}.png"}');
3939
scope.$set('path', 'a/b');
4040
scope.$eval();
@@ -142,7 +142,7 @@ describe("markups", function(){
142142
});
143143

144144
it('should bind src', function() {
145-
compile('<img ng:src="{{url}}" />');
145+
compile('<div ng:src="{{url}}" />');
146146
scope.url = 'http://localhost/';
147147
scope.$eval();
148148
expect(element.attr('src')).toEqual('http://localhost/');

0 commit comments

Comments
 (0)