mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-15 10:13:10 +00:00
style(warnings): prevent the browser from making bogus GET requests during tests
This commit is contained in:
parent
66fec10dc3
commit
ee04141a5a
2 changed files with 3 additions and 3 deletions
|
|
@ -111,7 +111,7 @@ describe("directive", function(){
|
||||||
|
|
||||||
describe('ng:bind-attr', function(){
|
describe('ng:bind-attr', function(){
|
||||||
it('should bind attributes', function(){
|
it('should bind attributes', function(){
|
||||||
var scope = compile('<img ng:bind-attr="{src:\'http://localhost/mysrc\', alt:\'myalt\'}"/>');
|
var scope = compile('<div ng:bind-attr="{src:\'http://localhost/mysrc\', alt:\'myalt\'}"/>');
|
||||||
expect(element.attr('src')).toEqual('http://localhost/mysrc');
|
expect(element.attr('src')).toEqual('http://localhost/mysrc');
|
||||||
expect(element.attr('alt')).toEqual('myalt');
|
expect(element.attr('alt')).toEqual('myalt');
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ describe("markups", function(){
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should translate {{}} in attributes', function(){
|
it('should translate {{}} in attributes', function(){
|
||||||
compile('<img src="http://server/{{path}}.png"/>');
|
compile('<div src="http://server/{{path}}.png"/>');
|
||||||
expect(element.attr('ng:bind-attr')).toEqual('{"src":"http://server/{{path}}.png"}');
|
expect(element.attr('ng:bind-attr')).toEqual('{"src":"http://server/{{path}}.png"}');
|
||||||
scope.$set('path', 'a/b');
|
scope.$set('path', 'a/b');
|
||||||
scope.$eval();
|
scope.$eval();
|
||||||
|
|
@ -142,7 +142,7 @@ describe("markups", function(){
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should bind src', function() {
|
it('should bind src', function() {
|
||||||
compile('<img ng:src="{{url}}" />');
|
compile('<div ng:src="{{url}}" />');
|
||||||
scope.url = 'http://localhost/';
|
scope.url = 'http://localhost/';
|
||||||
scope.$eval();
|
scope.$eval();
|
||||||
expect(element.attr('src')).toEqual('http://localhost/');
|
expect(element.attr('src')).toEqual('http://localhost/');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue