id: props['{' + Client.NS_OWNCLOUD + '}fileid'],
path: OC.dirname(path) || '/',
name: OC.basename(path),
- mtime: new Date(props['{' + Client.NS_DAV + '}getlastmodified'])
+ mtime: (new Date(props['{' + Client.NS_DAV + '}getlastmodified'])).getTime()
};
var etagProp = props['{' + Client.NS_DAV + '}getetag'];
expect(info.name).toEqual('One.txt');
expect(info.permissions).toEqual(31);
expect(info.size).toEqual(250);
- expect(info.mtime.getTime()).toEqual(1436535485000);
+ expect(info.mtime).toEqual(1436535485000);
expect(info.mimetype).toEqual('text/plain');
expect(info.etag).toEqual('559fcabd79a38');
expect(info.name).toEqual('sub');
expect(info.permissions).toEqual(31);
expect(info.size).toEqual(100);
- expect(info.mtime.getTime()).toEqual(1436536800000);
+ expect(info.mtime).toEqual(1436536800000);
expect(info.mimetype).toEqual('httpd/unix-directory');
expect(info.etag).toEqual('66cfcabd79abb');
});
expect(info.name).toEqual('文件夹');
expect(info.permissions).toEqual(31);
expect(info.size).toEqual(120);
- expect(info.mtime.getTime()).toEqual(1436522405000);
+ expect(info.mtime).toEqual(1436522405000);
expect(info.mimetype).toEqual('httpd/unix-directory');
expect(info.etag).toEqual('56cfcabd79abb');
expect(info.name).toEqual('文件夹');
expect(info.permissions).toEqual(31);
expect(info.size).toEqual(120);
- expect(info.mtime.getTime()).toEqual(1436522405000);
+ expect(info.mtime).toEqual(1436522405000);
expect(info.mimetype).toEqual('httpd/unix-directory');
expect(info.etag).toEqual('56cfcabd79abb');
});
expect(info.name).toEqual('in root');
expect(info.permissions).toEqual(31);
expect(info.size).toEqual(120);
- expect(info.mtime.getTime()).toEqual(1436522405000);
+ expect(info.mtime).toEqual(1436522405000);
expect(info.mimetype).toEqual('httpd/unix-directory');
expect(info.etag).toEqual('56cfcabd79abb');
});