aboutsummaryrefslogtreecommitdiffstats
path: root/test/webcals/request/abstract_test.js
diff options
context:
space:
mode:
authorJames Lal <james@lightsofapollo.com>2012-06-26 12:29:36 +0200
committerJames Lal <james@lightsofapollo.com>2012-06-26 12:29:36 +0200
commit95fe95710b81d14dda2a3b77281f1fe65f703ef3 (patch)
tree0ae6cf64a9d93ea7d6034e359433d1412f0f0aff /test/webcals/request/abstract_test.js
parent816243091b923cc64d87250f8cbd0854a1348312 (diff)
downloadjsCalDAV-95fe95710b81d14dda2a3b77281f1fe65f703ef3.tar.gz
add user/pass options to abstract request
Diffstat (limited to 'test/webcals/request/abstract_test.js')
-rw-r--r--test/webcals/request/abstract_test.js21
1 files changed, 14 insertions, 7 deletions
diff --git a/test/webcals/request/abstract_test.js b/test/webcals/request/abstract_test.js
index 0acb42b..37cd0f6 100644
--- a/test/webcals/request/abstract_test.js
+++ b/test/webcals/request/abstract_test.js
@@ -31,22 +31,29 @@ suite('webcals/request/abstract.js', function() {
FakeXhr.instances.length = 0;
});
- test('.xhr', function() {
- var xhr = subject.xhr;
- assert.instanceOf(xhr, Xhr);
- assert.equal(xhr.url, url);
- });
-
test('#_createPayload', function() {
assert.equal(subject._createPayload(), '');
});
test('#initializer', function() {
- assert.equal(subject.url, url);
+ assert.instanceOf(subject.xhr, Xhr);
+ assert.equal(subject.xhr.url, url);
assert.equal(subject.configOpt, options.configOpt);
assert.instanceOf(subject.sax, SAX);
});
+ test('xhr password options', function() {
+ var subject = new Abstract(url, {
+ password: 'password',
+ user: 'user'
+ });
+
+ var xhr = subject.xhr;
+
+ assert.equal(xhr.password, 'password');
+ assert.equal(xhr.user, 'user');
+ });
+
suite('#send', function(done) {
var xhr;