mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 13:54:35 +03:00
c4c48d4104
refs https://github.com/TryGhost/Admin/pull/2209 - `miragejs` has been extracted to a framework-independent library, the re-exports of `miragejs` elements in `ember-cli-mirage` have been deprecated making our test logs very noisy - added `miragejs` as a top-level dependency - updated all relevant imports to pull from `miragejs` instead of `ember-cli-mirage`
38 lines
803 B
JavaScript
38 lines
803 B
JavaScript
import {Factory, trait} from 'miragejs';
|
|
|
|
export default Factory.extend({
|
|
emailCount: 0,
|
|
error: null,
|
|
html: null,
|
|
plaintext: null,
|
|
stats: null,
|
|
status: 'sending',
|
|
subject: null,
|
|
|
|
submittedAtUTC: '2019-11-06T12:44:30.000Z',
|
|
uuid(i) { return `email-${i}`; },
|
|
|
|
createdAtUTC: '2019-11-06T12:44:30.000Z',
|
|
createdBy: 1,
|
|
updatedAtUTC: '2019-11-06T12:44:30.000Z',
|
|
updatedBy: 1,
|
|
|
|
sent: trait({
|
|
status: 'sent',
|
|
stats: JSON.stringify({
|
|
delivered: 0,
|
|
failed: 0,
|
|
opened: 0,
|
|
clicked: 0,
|
|
unsubscribed: 0,
|
|
complaints: 0
|
|
})
|
|
}),
|
|
|
|
failed: trait({
|
|
status: 'failed',
|
|
error: 'Narp! This was an expected test failure',
|
|
stats: null
|
|
})
|
|
});
|