mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-19 00:11:49 +03:00
d90ed28940
closes TryGhost/Ghost#6985 - renames all date properties to end with `UTC`: - `publishedAt` in `post` model - `createdAt` in `post`, `role`, `subscriber`, `tag` and `user` model - `updatedAt` in `post`, `role`, `subscriber`, `tag` and `user` model - `unsubscribedAt` in `subscriber` model - `lastLogin` in `user` model - adds `attrs` transforms in matching serializers `post`, `tag` and `user` - new serializers files for `subscribers` and `role` to add `attr` transforms - adds unit tests for all serializers - use two variables in `post-settings-menu` controller to handle blog-timezone adjusted date as well as UTC date
24 lines
573 B
JavaScript
24 lines
573 B
JavaScript
/* jshint expr:true */
|
|
import { expect } from 'chai';
|
|
import { describeModel, it } from 'ember-mocha';
|
|
|
|
describeModel(
|
|
'subscriber',
|
|
'Unit:Serializer: subscriber',
|
|
{
|
|
// Specify the other units that are required for this test.
|
|
needs: ['model:post', 'transform:moment-utc']
|
|
},
|
|
|
|
function() {
|
|
// Replace this with your real tests.
|
|
it('serializes records', function() {
|
|
let record = this.subject();
|
|
|
|
let serializedRecord = record.serialize();
|
|
|
|
expect(record).to.be.ok;
|
|
});
|
|
}
|
|
);
|