This repository has been archived by the owner on Feb 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* development: 1.0.0 Update package.json Make parsing of dates from ECM timezone-aware (#133) #128 CSRF Token set in cookie only in node env #130 fix header controllers api (#131) Update CHANGELOG.md 0.5.5 Update package.json improve npmignore and pointing for the pacakge #126 (#127) Add Report API - dev (#125) #121 - modified changelog #121 - fix babelify for IE10
- Loading branch information
Showing
12 changed files
with
694 additions
and
322 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/*global describe, it */ | ||
|
||
var ApiClient = require('../src/alfresco-core-rest-api/src/ApiClient'); | ||
var chai = require('chai'); | ||
var expect = chai.expect; | ||
|
||
chai.use(require('chai-datetime')); | ||
|
||
describe('Alfresco Core API Client', function () { | ||
|
||
it('should convert dates falling in GMT without a timezone', function () { | ||
expect(ApiClient.parseDate('2015-11-17T03:33:17')).to.equalTime(new Date(Date.UTC(2015, 10, 17, 3, 33, 17))); | ||
}); | ||
|
||
it('should convert dates falling in BST without a timezone', function () { | ||
expect(ApiClient.parseDate('2015-10-17T03:33:17')).to.equalTime(new Date(Date.UTC(2015, 9, 17, 3, 33, 17))); | ||
}); | ||
|
||
it('should convert dates with a UTC Zulu-time timezone', function () { | ||
expect(ApiClient.parseDate('2015-11-17T03:33:17Z')).to.equalTime(new Date(Date.UTC(2015, 10, 17, 3, 33, 17))); | ||
}); | ||
|
||
it('should convert dates with a UTC zero-offset timezone', function () { | ||
expect(ApiClient.parseDate('2015-11-17T03:33:17+0000')).to.equalTime(new Date(Date.UTC(2015, 10, 17, 3, 33, 17))); | ||
}); | ||
|
||
it('should convert dates with a positive offset timezone', function () { | ||
expect(ApiClient.parseDate('2015-11-17T03:33:17+0200')).to.equalTime(new Date(Date.UTC(2015, 10, 17, 1, 33, 17))); | ||
}); | ||
|
||
it('should convert dates with a negative offset timezone', function () { | ||
expect(ApiClient.parseDate('2015-11-17T03:33:17-0200')).to.equalTime(new Date(Date.UTC(2015, 10, 17, 5, 33, 17))); | ||
}); | ||
|
||
it('should convert dates with a part-hour offset', function () { | ||
expect(ApiClient.parseDate('2015-11-17T03:23:17-0930')).to.equalTime(new Date(Date.UTC(2015, 10, 17, 12, 53, 17))); | ||
}); | ||
|
||
it('should convert dates with a timezone HH:MM separator', function () { | ||
expect(ApiClient.parseDate('2015-11-17T03:33:17+02:00')).to.equalTime(new Date(Date.UTC(2015, 10, 17, 1, 33, 17))); | ||
}); | ||
|
||
it('should convert dates with a timezone with hours only', function () { | ||
expect(ApiClient.parseDate('2015-11-17T03:33:17+02')).to.equalTime(new Date(Date.UTC(2015, 10, 17, 1, 33, 17))); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters