diff options
author | James Lal <james@lightsofapollo.com> | 2012-07-06 08:13:15 -0700 |
---|---|---|
committer | James Lal <james@lightsofapollo.com> | 2012-07-06 08:13:15 -0700 |
commit | 20711f003e97a4a57d1e2838ba78a994c5faf6c0 (patch) | |
tree | b060e5de05a9ffefc2ec836469c087fffa99dcef /test/webcals/templates | |
parent | c8e85fe1e0a1d2e15df580068244324ff536a23a (diff) | |
download | jsCalDAV-20711f003e97a4a57d1e2838ba78a994c5faf6c0.tar.gz |
webcals -> caldav rename (yes, back again)
Diffstat (limited to 'test/webcals/templates')
-rw-r--r-- | test/webcals/templates/calendar_data_test.js | 70 | ||||
-rw-r--r-- | test/webcals/templates/calendar_filter_test.js | 53 |
2 files changed, 0 insertions, 123 deletions
diff --git a/test/webcals/templates/calendar_data_test.js b/test/webcals/templates/calendar_data_test.js deleted file mode 100644 index 64b6b57..0000000 --- a/test/webcals/templates/calendar_data_test.js +++ /dev/null @@ -1,70 +0,0 @@ -requireRequest(); -testSupport.lib('templates/calendar_data'); - -suite('webcals/templates/calendar_data', function() { - var CalendarData; - var Template; - - var subject; - var template; - - function select() { - subject.select('VTODO', ['DTIME']); - subject.select('VTODO', ['NAME', { VTIMEZONE: true }]); - subject.select('VEVENT', ['NAME', { - 'VALARM': ['NAME'] - }]); - } - - suiteSetup(function() { - CalendarData = Webcals.require('templates/calendar_data'); - Template = Webcals.require('template'); - }); - - setup(function() { - subject = new CalendarData(); - template = new Template('root'); - }); - - test('initialization', function() { - assert.deepEqual(subject.struct, {}); - }); - - suite('#render', function() { - var output; - var expected; - - expected = [ - '<N0:calendar-data>', - '<N0:comp name="VCALENDAR">', - '<N0:comp name="VTODO">', - '<N0:prop name="DTIME" />', - '<N0:prop name="NAME" />', - '<N0:comp name="VTIMEZONE" />', - '</N0:comp>', - '<N0:comp name="VEVENT">', - '<N0:prop name="NAME" />', - '<N0:comp name="VALARM">', - '<N0:prop name="NAME" />', - '</N0:comp>', - '</N0:comp>', - '</N0:comp>', - '</N0:calendar-data>' - ].join(''); - - test('without items', function() { - var output = subject.render(template); - assert.equal( - output, - '<N0:calendar-data />' - ); - }); - - test('output', function() { - select(); - var output = subject.render(template); - assert.equal(output, expected); - }); - }); - -}); diff --git a/test/webcals/templates/calendar_filter_test.js b/test/webcals/templates/calendar_filter_test.js deleted file mode 100644 index 8173569..0000000 --- a/test/webcals/templates/calendar_filter_test.js +++ /dev/null @@ -1,53 +0,0 @@ -requireRequest(); -testSupport.lib('templates/calendar_data'); -testSupport.lib('templates/calendar_filter'); - -suite('webcals/templates/calendar_filter', function() { - var CalendarFilter; - var Template; - - var subject; - var template; - - function filter() { - subject.add('VEVENT', true); - } - - suiteSetup(function() { - CalendarFilter = Webcals.require('templates/calendar_filter'); - Template = Webcals.require('template'); - }); - - setup(function() { - subject = new CalendarFilter(); - template = new Template('root'); - }); - - test('initialization', function() { - assert.deepEqual(subject.struct, {}); - }); - - suite('#render', function() { - var output; - var expected; - - expected = [ - '<N0:filter>', - '<N0:comp-filter name="VCALENDAR">', - '<N0:comp-filter name="VEVENT" />', - '</N0:comp-filter>', - '</N0:filter>' - ].join(''); - - setup(function() { - filter(); - }); - - test('output', function() { - var output = subject.render(template); - assert.equal(output, expected); - }); - }); - -}); - |