aboutsummaryrefslogtreecommitdiffstats
path: root/test/caldav/resources/calendar_test.js
diff options
context:
space:
mode:
authorJames Lal <james@lightsofapollo.com>2012-07-08 13:40:48 -0700
committerJames Lal <james@lightsofapollo.com>2012-07-08 13:40:48 -0700
commitdee456f357eb2c373988f7bc987eeabb8357050e (patch)
tree3ccec1f73f16155037dacf8fc311d438b450b55f /test/caldav/resources/calendar_test.js
parentf3bc5aa84e85167ce1b03df312a93517264f54ef (diff)
downloadjsCalDAV-dee456f357eb2c373988f7bc987eeabb8357050e.tar.gz
Hooking up calendar query to calendar resource
Diffstat (limited to 'test/caldav/resources/calendar_test.js')
-rw-r--r--test/caldav/resources/calendar_test.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/caldav/resources/calendar_test.js b/test/caldav/resources/calendar_test.js
index aa23918..d7689c0 100644
--- a/test/caldav/resources/calendar_test.js
+++ b/test/caldav/resources/calendar_test.js
@@ -1,3 +1,7 @@
+requireRequest();
+
+testSupport.lib('request/calendar_query');
+
testSupport.lib('resources/calendar'),
testSupport.lib('xhr');
testSupport.lib('connection');
@@ -6,6 +10,7 @@ suite('caldav/resources/calendar', function() {
var Calendar;
var Connection;
+ var CalendarQuery;
var con;
var url = 'foobar.com';
var subject;
@@ -13,6 +18,7 @@ suite('caldav/resources/calendar', function() {
suiteSetup(function() {
Calendar = Caldav.require('resources/calendar');
Connection = Caldav.require('connection');
+ CalendarQuery = Caldav.require('request/calendar_query');
});
setup(function() {
@@ -26,6 +32,7 @@ suite('caldav/resources/calendar', function() {
test('without calendar data', function() {
assert.equal(subject.url, url);
+ assert.equal(subject.connection, con);
});
test('with calendar data', function() {
@@ -42,6 +49,20 @@ suite('caldav/resources/calendar', function() {
});
+ suite('#createQuery', function() {
+
+ var result;
+
+ setup(function() {
+ result = subject.createQuery();
+ });
+
+ test('result', function() {
+ assert.instanceOf(result, CalendarQuery);
+ assert.equal(result.url, url);
+ });
+ });
+
suite('#updateFromServer', function() {
function status(value, status) {