summaryrefslogtreecommitdiffstats
path: root/core/js/tests
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-10-05 22:02:12 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-10-05 22:02:12 +0200
commitea72d9061758c21ec735c2fc1dcc73320854f38d (patch)
tree59e2179bca8d53b8550f5a604def6de820c99249 /core/js/tests
parent94c0cc1bb335bbd82ecbc235e76e11f4fa0d84a6 (diff)
parent96deeca34d3e5cc930e171a2e3c826d53f513da1 (diff)
downloadnextcloud-server-ea72d9061758c21ec735c2fc1dcc73320854f38d.tar.gz
nextcloud-server-ea72d9061758c21ec735c2fc1dcc73320854f38d.zip
Merge pull request #19553 from owncloud/properly_format_date_shareview
Use DD-MM-YYYY consistently in share sidebar
Diffstat (limited to 'core/js/tests')
-rw-r--r--core/js/tests/specs/sharedialogviewSpec.js13
1 files changed, 5 insertions, 8 deletions
diff --git a/core/js/tests/specs/sharedialogviewSpec.js b/core/js/tests/specs/sharedialogviewSpec.js
index b01a3d2cae6..22ae63e796a 100644
--- a/core/js/tests/specs/sharedialogviewSpec.js
+++ b/core/js/tests/specs/sharedialogviewSpec.js
@@ -311,10 +311,10 @@ describe('OC.Share.ShareDialogView', function() {
expect(dialog.$el.find('#expirationDate').val()).toEqual('');
});
it('checks expiration date checkbox and populates field when expiration date was set', function() {
- shareModel.get('linkShare').expiration = 1234;
+ shareModel.get('linkShare').expiration = '2014-02-01 00:00:00';
dialog.render();
expect(dialog.$el.find('[name=expirationCheckbox]').prop('checked')).toEqual(true);
- expect(dialog.$el.find('#expirationDate').val()).toEqual('1234');
+ expect(dialog.$el.find('#expirationDate').val()).toEqual('01-02-2014');
});
it('sets default date when default date setting is enabled', function() {
configModel.set('isDefaultExpireDateEnabled', true);
@@ -326,8 +326,7 @@ describe('OC.Share.ShareDialogView', function() {
// enabled by default
expect(dialog.$el.find('[name=expirationCheckbox]').prop('checked')).toEqual(true);
- // TODO: those zeros must go...
- expect(dialog.$el.find('#expirationDate').val()).toEqual('2014-1-27 00:00:00');
+ expect(dialog.$el.find('#expirationDate').val()).toEqual('27-01-2014');
// disabling is allowed
dialog.$el.find('[name=expirationCheckbox]').click();
@@ -345,8 +344,7 @@ describe('OC.Share.ShareDialogView', function() {
dialog.render();
expect(dialog.$el.find('[name=expirationCheckbox]').prop('checked')).toEqual(true);
- // TODO: those zeros must go...
- expect(dialog.$el.find('#expirationDate').val()).toEqual('2014-1-27 00:00:00');
+ expect(dialog.$el.find('#expirationDate').val()).toEqual('27-01-2014');
// disabling is not allowed
expect(dialog.$el.find('[name=expirationCheckbox]').prop('disabled')).toEqual(true);
@@ -375,8 +373,7 @@ describe('OC.Share.ShareDialogView', function() {
);
expect(dialog.$el.find('[name=expirationCheckbox]').prop('checked')).toEqual(true);
- // TODO: those zeros must go...
- expect(dialog.$el.find('#expirationDate').val()).toEqual('2014-1-27 00:00:00');
+ expect(dialog.$el.find('#expirationDate').val()).toEqual('27-01-2014');
// disabling is not allowed
expect(dialog.$el.find('[name=expirationCheckbox]').prop('disabled')).toEqual(true);