Ghost/ghost/admin/mirage/factories/webhook.js
Kevin Ansfield c33edbac08 Fixed webhook modal title showing "New webhook" when editing a webhook
refs https://github.com/TryGhost/Ghost/issues/10137
- adjust modal title depending on `webhook.isNew` state
- add acceptance tests for modal creation
- add missing mirage webhook factory
- mock integrations/api-keys/webhooks in test env rather than development
2018-11-12 16:31:47 +00:00

19 lines
538 B
JavaScript

import moment from 'moment';
import {AVAILABLE_EVENTS} from 'ghost-admin/helpers/event-name';
import {Factory} from 'ember-cli-mirage';
export default Factory.extend({
name(i) { return `Integration ${i + 1}`;},
event(i) {
let event = AVAILABLE_EVENTS[i % 3];
return event.event;
},
target(i) { return `https://example.com/${i + 1}`; },
lastTriggeredAt: null,
createdAt() { return moment.utc().format(); },
createdBy: 1,
updatedAt() { return moment.utc().format(); },
updatedBy: 1
});