aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/service/httpBackendSpec.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/service/httpBackendSpec.js b/test/service/httpBackendSpec.js
index 55d1a48a..820099e8 100644
--- a/test/service/httpBackendSpec.js
+++ b/test/service/httpBackendSpec.js
@@ -168,6 +168,17 @@ describe('$httpBackend', function() {
});
+ it('should set url to current location if not specified or empty string', function() {
+ $backend('JSONP', undefined, null, callback);
+ expect($browser.$$scripts[0].url).toBe($browser.url());
+ $browser.$$scripts.shift();
+
+ $backend('JSONP', '', null, callback);
+ expect($browser.$$scripts[0].url).toBe($browser.url());
+ $browser.$$scripts.shift();
+ });
+
+
// TODO(vojta): test whether it fires "async-start"
// TODO(vojta): test whether it fires "async-end" on both success and error
});